Commit 41b4fcbfc3cfaa5593ee75b602689561c56a6cb6
1 parent
6c6724c3
Let perf-view-creation sample use border and blur
Now we fix partial update issue for Borderline / BlurRadius. We can test about this properties Change-Id: I0613a9676b8239ee1983295d599da723c735c842 Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
Showing
1 changed file
with
2 additions
and
14 deletions
examples/perf-view-creation/perf-view-creation-example.cpp
| ... | ... | @@ -34,10 +34,6 @@ using namespace Dali; |
| 34 | 34 | using namespace Dali::Toolkit; |
| 35 | 35 | using namespace std; |
| 36 | 36 | |
| 37 | -// TODO : borderline, blur type need to solve partial update issue. | |
| 38 | -// Until that issue exist, just block it. | |
| 39 | -#define ALLOW_BORDER_AND_BLUR 0 | |
| 40 | - | |
| 41 | 37 | namespace |
| 42 | 38 | { |
| 43 | 39 | enum class ControlTestType |
| ... | ... | @@ -47,12 +43,10 @@ enum class ControlTestType |
| 47 | 43 | IMAGE, ///< Test with simple image |
| 48 | 44 | TEXT, ///< Test with simple text label |
| 49 | 45 | ROUNDED_COLOR, ///< Test with rounded color |
| 50 | -#if ALLOW_BORDER_AND_BLUR | |
| 51 | 46 | BORDER_COLOR, ///< Test with borderline color |
| 52 | 47 | ROUNDED_BORDER_COLOR, ///< Test with rounded borderline color |
| 53 | 48 | BLUR_COLOR, ///< Test with blur color |
| 54 | - ROUNDED_BLUR_COLOR, ///< Test with blur color | |
| 55 | -#endif | |
| 49 | + ROUNDED_BLUR_COLOR, ///< Test with rounded blur color | |
| 56 | 50 | TYPE_MAX, |
| 57 | 51 | // clang-format on |
| 58 | 52 | }; |
| ... | ... | @@ -66,12 +60,10 @@ const char* TestTypeString(ControlTestType type) |
| 66 | 60 | case ControlTestType::IMAGE: return "IMAGE"; |
| 67 | 61 | case ControlTestType::TEXT: return "TEXT"; |
| 68 | 62 | case ControlTestType::ROUNDED_COLOR: return "ROUNDED COLOR"; |
| 69 | -#if ALLOW_BORDER_AND_BLUR | |
| 70 | 63 | case ControlTestType::BORDER_COLOR: return "BORDER COLOR"; |
| 71 | 64 | case ControlTestType::ROUNDED_BORDER_COLOR:return "ROUNDED BORDER COLOR"; |
| 72 | 65 | case ControlTestType::BLUR_COLOR: return "BLUR COLOR"; |
| 73 | 66 | case ControlTestType::ROUNDED_BLUR_COLOR: return "ROUNDED BLUR COLOR"; |
| 74 | -#endif | |
| 75 | 67 | default: return "UNKNOWN"; |
| 76 | 68 | } |
| 77 | 69 | // clang-format on |
| ... | ... | @@ -94,7 +86,7 @@ constexpr uint32_t DURATION_OF_ANIMATION(DURATION_PER_COLUMNS*(COLUMNS_COUNT * 4 |
| 94 | 86 | // We should render same type of views in some timing. |
| 95 | 87 | static_assert(COLUMNS_COUNT * 2 <= TOTAL_COLUMNS_COUNT); |
| 96 | 88 | |
| 97 | -constexpr float VIEW_MARGIN_RATE = 0.1f; | |
| 89 | +constexpr float VIEW_MARGIN_RATE = 0.2f; | |
| 98 | 90 | |
| 99 | 91 | // copy from dali-adaptor time-service.cpp |
| 100 | 92 | void GetNanoseconds(uint64_t& timeInNanoseconds) |
| ... | ... | @@ -141,7 +133,6 @@ Control CreateRoundedColor() |
| 141 | 133 | return bgView; |
| 142 | 134 | } |
| 143 | 135 | |
| 144 | -#if ALLOW_BORDER_AND_BLUR | |
| 145 | 136 | Control CreateBorderColor(const float& requiredBorderlineWidth) |
| 146 | 137 | { |
| 147 | 138 | Control bgView = Control::New(Control::ControlBehaviour::DISABLE_STYLE_CHANGE_SIGNALS); |
| ... | ... | @@ -203,7 +194,6 @@ Control CreateRoundedBlurColor(const float& requiredBlurRadius) |
| 203 | 194 | |
| 204 | 195 | return bgView; |
| 205 | 196 | } |
| 206 | -#endif | |
| 207 | 197 | |
| 208 | 198 | /** |
| 209 | 199 | * @brief Statistic container that we can get average / sum / min/ max. |
| ... | ... | @@ -379,7 +369,6 @@ public: |
| 379 | 369 | bgView = CreateRoundedColor(); |
| 380 | 370 | break; |
| 381 | 371 | } |
| 382 | -#if ALLOW_BORDER_AND_BLUR | |
| 383 | 372 | case ControlTestType::BORDER_COLOR: |
| 384 | 373 | { |
| 385 | 374 | bgView = CreateBorderColor(std::min(mSize.x, mSize.y) * VIEW_MARGIN_RATE); |
| ... | ... | @@ -400,7 +389,6 @@ public: |
| 400 | 389 | bgView = CreateRoundedBlurColor(std::min(mSize.x, mSize.y) * VIEW_MARGIN_RATE * 0.5f); |
| 401 | 390 | break; |
| 402 | 391 | } |
| 403 | -#endif | |
| 404 | 392 | } |
| 405 | 393 | |
| 406 | 394 | bgView[Actor::Property::PARENT_ORIGIN] = ParentOrigin::TOP_LEFT; | ... | ... |