2 * Copyright (c) 2024 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 #include <dali-toolkit/internal/visuals/npatch/npatch-visual.h>
22 #include <dali/devel-api/adaptor-framework/image-loading.h>
23 #include <dali/devel-api/common/stage.h>
24 #include <dali/devel-api/rendering/renderer-devel.h>
25 #include <dali/integration-api/debug.h>
28 #include <dali-toolkit/devel-api/utility/npatch-helper.h>
29 #include <dali-toolkit/devel-api/visuals/image-visual-properties-devel.h>
30 #include <dali-toolkit/internal/graphics/builtin-shader-extern-gen.h>
31 #include <dali-toolkit/internal/visuals/image-atlas-manager.h>
32 #include <dali-toolkit/internal/visuals/image-visual-shader-factory.h>
33 #include <dali-toolkit/internal/visuals/image-visual-shader-feature-builder.h>
34 #include <dali-toolkit/internal/visuals/npatch-loader.h>
35 #include <dali-toolkit/internal/visuals/rendering-addon.h>
36 #include <dali-toolkit/internal/visuals/visual-base-data-impl.h>
37 #include <dali-toolkit/internal/visuals/visual-base-impl.h>
38 #include <dali-toolkit/internal/visuals/visual-factory-cache.h>
39 #include <dali-toolkit/internal/visuals/visual-factory-impl.h>
40 #include <dali-toolkit/internal/visuals/visual-string-constants.h>
41 #include <dali-toolkit/public-api/visuals/visual-properties.h>
51 const int CUSTOM_PROPERTY_COUNT(5); // fixed(3),stretch,aux
54 /////////////////NPatchVisual////////////////
56 NPatchVisualPtr NPatchVisual::New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl, const Property::Map& properties)
58 NPatchVisualPtr nPatchVisual(new NPatchVisual(factoryCache, shaderFactory));
59 nPatchVisual->mImageUrl = imageUrl;
60 nPatchVisual->SetProperties(properties);
61 nPatchVisual->Initialize();
65 NPatchVisualPtr NPatchVisual::New(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory, const VisualUrl& imageUrl)
67 NPatchVisualPtr nPatchVisual(new NPatchVisual(factoryCache, shaderFactory));
68 nPatchVisual->mImageUrl = imageUrl;
69 nPatchVisual->Initialize();
73 void NPatchVisual::LoadImages()
75 TextureManager& textureManager = mFactoryCache.GetTextureManager();
76 bool synchronousLoading = mImpl->mFlags & Impl::IS_SYNCHRONOUS_RESOURCE_LOADING;
78 if(mId == NPatchData::INVALID_NPATCH_DATA_ID)
80 bool preMultiplyOnLoad = IsPreMultipliedAlphaEnabled() && !mImpl->mCustomShader ? true : false;
81 mId = mLoader.Load(textureManager, this, mImageUrl, mBorder, preMultiplyOnLoad, synchronousLoading);
84 if(mLoader.GetNPatchData(mId, data) && data->GetLoadingState() == NPatchData::LoadingState::LOAD_COMPLETE)
86 EnablePreMultipliedAlpha(data->IsPreMultiplied());
90 if(mAuxiliaryTextureId == TextureManager::INVALID_TEXTURE_ID && mAuxiliaryUrl.IsValid())
92 auto preMultiplyOnLoad = IsPreMultipliedAlphaEnabled() && !mImpl->mCustomShader
93 ? TextureManager::MultiplyOnLoad::MULTIPLY_ON_LOAD
94 : TextureManager::MultiplyOnLoad::LOAD_WITHOUT_MULTIPLY;
96 TextureManager::MaskingDataPointer maskingDataPtr = nullptr;
97 ImageAtlasManagerPtr imageAtlasManagerPtr = nullptr;
99 bool atlasing = false;
100 auto atlasRect = Vector4::ZERO;
101 auto atlasRectSize = Dali::ImageDimensions();
103 bool loadingStatus = false;
105 // Load the auxiliary image
106 mAuxiliaryTextureSet = textureManager.LoadTexture(mAuxiliaryUrl, Dali::ImageDimensions(), FittingMode::DEFAULT, SamplingMode::BOX_THEN_LINEAR, maskingDataPtr, synchronousLoading, mAuxiliaryTextureId, atlasRect, atlasRectSize, atlasing, loadingStatus, this, nullptr, imageAtlasManagerPtr, true, TextureManager::ReloadPolicy::CACHED, preMultiplyOnLoad);
108 // If synchronousLoading is true, we can check the auxiliaryResource's status now.
109 if(synchronousLoading)
111 mAuxiliaryResourceStatus = (mAuxiliaryTextureSet && mAuxiliaryTextureSet.GetTextureCount() > 0u) ? Toolkit::Visual::ResourceStatus::READY : Toolkit::Visual::ResourceStatus::FAILED;
116 void NPatchVisual::GetNaturalSize(Vector2& naturalSize)
121 // load now if not already loaded
123 if(mLoader.GetNPatchData(mId, data) && data->GetLoadingState() != NPatchData::LoadingState::LOADING)
125 naturalSize.x = data->GetCroppedWidth();
126 naturalSize.y = data->GetCroppedHeight();
130 if(mImageUrl.IsValid())
132 ImageDimensions dimensions = Dali::GetOriginalImageSize(mImageUrl.GetUrl());
133 if(dimensions != ImageDimensions(0, 0))
135 naturalSize.x = dimensions.GetWidth();
136 naturalSize.y = dimensions.GetHeight();
141 if(mAuxiliaryTextureSet && mAuxiliaryTextureSet.GetTextureCount() > 0u)
143 naturalSize.x = std::max(naturalSize.x, float(mAuxiliaryTextureSet.GetTexture(0u).GetWidth()));
144 naturalSize.y = std::max(naturalSize.y, float(mAuxiliaryTextureSet.GetTexture(0u).GetHeight()));
148 void NPatchVisual::DoSetProperties(const Property::Map& propertyMap)
150 // URL is already passed in via constructor
152 Property::Value* borderOnlyValue = propertyMap.Find(Toolkit::ImageVisual::Property::BORDER_ONLY, BORDER_ONLY);
155 borderOnlyValue->Get(mBorderOnly);
158 Property::Value* borderValue = propertyMap.Find(Toolkit::ImageVisual::Property::BORDER, BORDER);
159 if(borderValue && !borderValue->Get(mBorder)) // If value exists and is rect, just set mBorder
161 // Not a rect so try vector4
163 if(borderValue->Get(border))
165 mBorder.left = static_cast<int>(border.x);
166 mBorder.right = static_cast<int>(border.y);
167 mBorder.bottom = static_cast<int>(border.z);
168 mBorder.top = static_cast<int>(border.w);
172 Property::Value* auxImage = propertyMap.Find(Toolkit::DevelImageVisual::Property::AUXILIARY_IMAGE, AUXILIARY_IMAGE_NAME);
176 if(auxImage->Get(url))
182 Property::Value* auxImageAlpha = propertyMap.Find(Toolkit::DevelImageVisual::Property::AUXILIARY_IMAGE_ALPHA, AUXILIARY_IMAGE_ALPHA_NAME);
185 auxImageAlpha->Get(mAuxiliaryImageAlpha);
188 Property::Value* synchronousLoading = propertyMap.Find(Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, SYNCHRONOUS_LOADING);
189 if(synchronousLoading)
192 synchronousLoading->Get(sync);
195 mImpl->mFlags |= Impl::IS_SYNCHRONOUS_RESOURCE_LOADING;
199 mImpl->mFlags &= ~Impl::IS_SYNCHRONOUS_RESOURCE_LOADING;
203 Property::Value* releasePolicy = propertyMap.Find(Toolkit::ImageVisual::Property::RELEASE_POLICY, RELEASE_POLICY_NAME);
206 releasePolicy->Get(mReleasePolicy);
210 void NPatchVisual::DoSetOnScene(Actor& actor)
212 // load when first go on stage
215 // Set mPlacementActor now, because some case, LoadImages can use this information in LoadComplete API.
216 // at this case, we try to SetResouce to mPlaceActor twice. so, we should avoid that case.
217 mPlacementActor = actor;
220 if(mImpl->mRenderer && mLoader.GetNPatchData(mId, data) && data->GetLoadingState() != NPatchData::LoadingState::LOADING)
222 // If mAuxiliaryUrl need to be loaded, we should wait it until LoadComplete called.
223 if(!mAuxiliaryUrl.IsValid() || mAuxiliaryResourceStatus != Toolkit::Visual::ResourceStatus::PREPARING)
230 void NPatchVisual::DoSetOffScene(Actor& actor)
232 if(mReleasePolicy == Toolkit::ImageVisual::ReleasePolicy::DETACHED)
234 if(mId != NPatchData::INVALID_NPATCH_DATA_ID)
236 mLoader.RequestRemove(mId, this);
237 mImpl->mResourceStatus = Toolkit::Visual::ResourceStatus::PREPARING;
238 mId = NPatchData::INVALID_NPATCH_DATA_ID;
240 if(mAuxiliaryTextureId != TextureManager::INVALID_TEXTURE_ID)
242 TextureManager& textureManager = mFactoryCache.GetTextureManager();
243 textureManager.RequestRemove(mAuxiliaryTextureId, this);
244 mAuxiliaryTextureId = TextureManager::INVALID_TEXTURE_ID;
245 mAuxiliaryResourceStatus = Toolkit::Visual::ResourceStatus::PREPARING;
246 mAuxiliaryTextureSet.Reset();
250 actor.RemoveRenderer(mImpl->mRenderer);
251 mPlacementActor.Reset();
254 void NPatchVisual::OnSetTransform()
258 mImpl->mTransform.SetUniforms(mImpl->mRenderer, Direction::LEFT_TO_RIGHT);
262 void NPatchVisual::DoCreatePropertyMap(Property::Map& map) const
265 bool sync = IsSynchronousLoadingRequired();
266 map.Insert(Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING, sync);
267 map.Insert(Toolkit::Visual::Property::TYPE, Toolkit::Visual::N_PATCH);
268 map.Insert(Toolkit::ImageVisual::Property::URL, mImageUrl.GetUrl());
269 map.Insert(Toolkit::ImageVisual::Property::BORDER_ONLY, mBorderOnly);
270 map.Insert(Toolkit::ImageVisual::Property::BORDER, mBorder);
271 map.Insert(Toolkit::ImageVisual::Property::RELEASE_POLICY, mReleasePolicy);
273 if(mAuxiliaryUrl.IsValid())
275 map.Insert(Toolkit::DevelImageVisual::Property::AUXILIARY_IMAGE, mAuxiliaryUrl.GetUrl());
276 map.Insert(Toolkit::DevelImageVisual::Property::AUXILIARY_IMAGE_ALPHA, mAuxiliaryImageAlpha);
280 void NPatchVisual::DoCreateInstancePropertyMap(Property::Map& map) const
282 if(mAuxiliaryUrl.IsValid())
284 map.Insert(Toolkit::DevelImageVisual::Property::AUXILIARY_IMAGE, mAuxiliaryUrl.GetUrl());
285 map.Insert(Toolkit::DevelImageVisual::Property::AUXILIARY_IMAGE_ALPHA, mAuxiliaryImageAlpha);
289 NPatchVisual::NPatchVisual(VisualFactoryCache& factoryCache, ImageVisualShaderFactory& shaderFactory)
290 : Visual::Base(factoryCache, Visual::FittingMode::FILL, Toolkit::Visual::N_PATCH),
292 mLoader(factoryCache.GetNPatchLoader()),
293 mImageVisualShaderFactory(shaderFactory),
296 mId(NPatchData::INVALID_NPATCH_DATA_ID),
297 mAuxiliaryTextureSet(),
298 mAuxiliaryTextureId(TextureManager::INVALID_TEXTURE_ID),
299 mAuxiliaryResourceStatus(Toolkit::Visual::ResourceStatus::PREPARING),
302 mAuxiliaryImageAlpha(0.0f),
303 mReleasePolicy(Toolkit::ImageVisual::ReleasePolicy::DETACHED)
305 EnablePreMultipliedAlpha(mFactoryCache.GetPreMultiplyOnLoad());
308 NPatchVisual::~NPatchVisual()
310 if(Stage::IsInstalled())
312 if(mReleasePolicy != Toolkit::ImageVisual::ReleasePolicy::NEVER)
314 if(mId != NPatchData::INVALID_NPATCH_DATA_ID)
316 mLoader.RequestRemove(mId, this);
317 mId = NPatchData::INVALID_NPATCH_DATA_ID;
319 if(mAuxiliaryTextureId != TextureManager::INVALID_TEXTURE_ID)
321 TextureManager& textureManager = mFactoryCache.GetTextureManager();
323 textureManager.RequestRemove(mAuxiliaryTextureId, this);
324 mAuxiliaryTextureId = TextureManager::INVALID_TEXTURE_ID;
325 mAuxiliaryTextureSet.Reset();
331 void NPatchVisual::OnInitialize()
333 // Get basic geometry and shader
334 Geometry geometry = mFactoryCache.GetGeometry(VisualFactoryCache::QUAD_GEOMETRY);
335 auto imageVisualShaderFeatureBuilder = ImageVisualShaderFeatureBuilder();
336 Shader shader = mImageVisualShaderFactory.GetShader(
338 imageVisualShaderFeatureBuilder);
340 mImpl->mRenderer = VisualRenderer::New(geometry, shader);
341 mImpl->mRenderer.ReserveCustomProperties(CUSTOM_PROPERTY_COUNT);
343 //Register transform properties
344 mImpl->mTransform.SetUniforms(mImpl->mRenderer, Direction::LEFT_TO_RIGHT);
347 Geometry NPatchVisual::CreateGeometry()
351 if(mLoader.GetNPatchData(mId, data) && data->GetLoadingState() == NPatchData::LoadingState::LOAD_COMPLETE)
353 if(data->GetStretchPixelsX().Size() == 1 && data->GetStretchPixelsY().Size() == 1)
355 if(DALI_UNLIKELY(mBorderOnly))
357 geometry = GetNinePatchGeometry(VisualFactoryCache::NINE_PATCH_BORDER_GEOMETRY);
361 if(data->GetRenderingMap())
363 uint32_t elementCount[2];
364 geometry = RenderingAddOn::Get().CreateGeometryGrid(data->GetRenderingMap(), Uint16Pair(3, 3), elementCount);
367 RenderingAddOn::Get().SubmitRenderTask(mImpl->mRenderer, data->GetRenderingMap());
372 geometry = GetNinePatchGeometry(VisualFactoryCache::NINE_PATCH_GEOMETRY);
376 else if(data->GetStretchPixelsX().Size() > 0 || data->GetStretchPixelsY().Size() > 0)
378 Uint16Pair gridSize(2 * data->GetStretchPixelsX().Size() + 1, 2 * data->GetStretchPixelsY().Size() + 1);
379 if(!data->GetRenderingMap())
381 geometry = !mBorderOnly ? NPatchHelper::CreateGridGeometry(gridSize) : NPatchHelper::CreateBorderGeometry(gridSize);
385 uint32_t elementCount[2];
386 geometry = !mBorderOnly ? RenderingAddOn::Get().CreateGeometryGrid(data->GetRenderingMap(), gridSize, elementCount) : NPatchHelper::CreateBorderGeometry(gridSize);
389 RenderingAddOn::Get().SubmitRenderTask(mImpl->mRenderer, data->GetRenderingMap());
396 // no N patch data so use default geometry
397 geometry = GetNinePatchGeometry(VisualFactoryCache::NINE_PATCH_GEOMETRY);
402 Shader NPatchVisual::CreateShader()
406 // 0 is either no data (load failed?) or no stretch regions on image
407 // for both cases we use the default shader
408 NPatchUtility::StretchRanges::SizeType xStretchCount = 0;
409 NPatchUtility::StretchRanges::SizeType yStretchCount = 0;
411 auto fragmentShader = mAuxiliaryResourceStatus == Toolkit::Visual::ResourceStatus::READY ? SHADER_NPATCH_VISUAL_MASK_SHADER_FRAG
412 : SHADER_NPATCH_VISUAL_SHADER_FRAG;
413 auto shaderType = mAuxiliaryResourceStatus == Toolkit::Visual::ResourceStatus::READY ? VisualFactoryCache::NINE_PATCH_MASK_SHADER
414 : VisualFactoryCache::NINE_PATCH_SHADER;
416 // ask loader for the regions
417 if(mLoader.GetNPatchData(mId, data))
419 xStretchCount = data->GetStretchPixelsX().Count();
420 yStretchCount = data->GetStretchPixelsY().Count();
423 if(DALI_LIKELY(!mImpl->mCustomShader))
425 if(DALI_LIKELY((xStretchCount == 1 && yStretchCount == 1) ||
426 (xStretchCount == 0 && yStretchCount == 0)))
428 shader = mFactoryCache.GetShader(shaderType);
429 if(DALI_UNLIKELY(!shader))
431 shader = mFactoryCache.GenerateAndSaveShader(shaderType, SHADER_NPATCH_VISUAL_3X3_SHADER_VERT, fragmentShader);
434 else if(xStretchCount > 0 || yStretchCount > 0)
436 std::stringstream shaderName;
437 shaderName << "N_PATCH_" << xStretchCount << "x" << yStretchCount;
439 std::stringstream vertexShader;
440 vertexShader << "#define FACTOR_SIZE_X " << xStretchCount + 2 << "\n"
441 << "#define FACTOR_SIZE_Y " << yStretchCount + 2 << "\n"
442 << SHADER_NPATCH_VISUAL_SHADER_VERT;
444 shader = Shader::New(vertexShader.str(), fragmentShader, Dali::Shader::Hint::NONE, shaderName.str());
449 Dali::Shader::Hint::Value hints = Dali::Shader::Hint::NONE;
451 if(!mImpl->mCustomShader->mFragmentShader.empty())
453 fragmentShader = mImpl->mCustomShader->mFragmentShader.c_str();
455 hints = mImpl->mCustomShader->mHints;
457 /* Apply Custom Vertex Shader only if image is 9-patch */
458 if((xStretchCount == 1 && yStretchCount == 1) ||
459 (xStretchCount == 0 && yStretchCount == 0))
461 const char* vertexShader = SHADER_NPATCH_VISUAL_3X3_SHADER_VERT.data();
463 if(!mImpl->mCustomShader->mVertexShader.empty())
465 vertexShader = mImpl->mCustomShader->mVertexShader.c_str();
467 shader = Shader::New(vertexShader, fragmentShader, hints);
469 else if(xStretchCount > 0 || yStretchCount > 0)
471 std::stringstream shaderName;
472 shaderName << "N_PATCH_" << xStretchCount << "x" << yStretchCount;
474 std::stringstream vertexShader;
475 vertexShader << "#define FACTOR_SIZE_X " << xStretchCount + 2 << "\n"
476 << "#define FACTOR_SIZE_Y " << yStretchCount + 2 << "\n"
477 << SHADER_NPATCH_VISUAL_SHADER_VERT;
479 shader = Shader::New(vertexShader.str(), fragmentShader, hints, shaderName.str());
486 void NPatchVisual::ApplyTextureAndUniforms()
489 TextureSet textureSet;
491 if(mLoader.GetNPatchData(mId, data) && data->GetLoadingState() == NPatchData::LoadingState::LOAD_COMPLETE)
493 textureSet = data->GetTextures();
494 NPatchHelper::ApplyTextureAndUniforms(mImpl->mRenderer, data.Get());
496 if(mAuxiliaryResourceStatus == Toolkit::Visual::ResourceStatus::READY)
498 DALI_ASSERT_ALWAYS(mAuxiliaryTextureId != TextureManager::INVALID_TEXTURE_ID);
499 DALI_ASSERT_ALWAYS(mAuxiliaryTextureSet && mAuxiliaryTextureSet.GetTextureCount() > 0u);
501 // TODO : This code exist due to the texture cache manager hold TextureSet, not Texture.
502 // If we call textureSet.SetTexture(1, texture) directly, the cached TextureSet also be changed.
503 // We should make pass utc-Dali-VisualFactory.cpp UtcDaliNPatchVisualAuxiliaryImage02().
504 TextureSet tempTextureSet = TextureSet::New();
505 tempTextureSet.SetTexture(1, mAuxiliaryTextureSet.GetTexture(0));
506 tempTextureSet.SetTexture(0, textureSet.GetTexture(0));
507 textureSet = tempTextureSet;
509 mImpl->mRenderer.RegisterProperty(DevelImageVisual::Property::AUXILIARY_IMAGE_ALPHA,
510 AUXILIARY_IMAGE_ALPHA_NAME,
511 mAuxiliaryImageAlpha);
513 mImpl->mRenderer.SetTextures(textureSet);
517 DALI_LOG_ERROR("The N patch image '%s' is not a valid N patch image\n", mImageUrl.GetUrl().c_str());
518 Actor actor = mPlacementActor.GetHandle();
519 Vector2 imageSize = Vector2::ZERO;
522 imageSize = actor.GetProperty(Actor::Property::SIZE).Get<Vector2>();
524 mFactoryCache.UpdateBrokenImageRenderer(mImpl->mRenderer, imageSize, false);
527 // Register transform properties
528 mImpl->mTransform.SetUniforms(mImpl->mRenderer, Direction::LEFT_TO_RIGHT);
531 Geometry NPatchVisual::GetNinePatchGeometry(VisualFactoryCache::GeometryType subType)
533 Geometry geometry = mFactoryCache.GetGeometry(subType);
536 if(DALI_LIKELY(VisualFactoryCache::NINE_PATCH_GEOMETRY == subType))
538 geometry = NPatchHelper::CreateGridGeometry(Uint16Pair(3, 3));
540 else if(VisualFactoryCache::NINE_PATCH_BORDER_GEOMETRY == subType)
542 geometry = NPatchHelper::CreateBorderGeometry(Uint16Pair(3, 3));
544 mFactoryCache.SaveGeometry(subType, geometry);
549 void NPatchVisual::SetResource()
552 if(mImpl->mRenderer && mLoader.GetNPatchData(mId, data))
554 Geometry geometry = CreateGeometry();
555 Shader shader = CreateShader();
557 mImpl->mRenderer.SetGeometry(geometry);
558 mImpl->mRenderer.SetShader(shader);
560 if(RenderingAddOn::Get().IsValid())
562 RenderingAddOn::Get().SubmitRenderTask(mImpl->mRenderer, data->GetRenderingMap());
564 Actor actor = mPlacementActor.GetHandle();
567 ApplyTextureAndUniforms();
568 actor.AddRenderer(mImpl->mRenderer);
569 mPlacementActor.Reset();
572 // npatch loaded and ready to display
573 if(data->GetLoadingState() != NPatchData::LoadingState::LOAD_COMPLETE)
575 ResourceReady(Toolkit::Visual::ResourceStatus::FAILED);
579 ResourceReady(Toolkit::Visual::ResourceStatus::READY);
584 void NPatchVisual::LoadComplete(bool loadSuccess, TextureInformation textureInformation)
586 if(textureInformation.url.length() > 0) // For the Url.
588 if(DALI_UNLIKELY(mId == NPatchData::INVALID_NPATCH_DATA_ID))
590 // Special case when mLoader.Load call LoadComplete function before mId setup.
591 // We can overwrite mId.
592 mId = static_cast<NPatchData::NPatchDataId>(textureInformation.textureId);
596 EnablePreMultipliedAlpha(textureInformation.preMultiplied);
599 else // For the AuxiliaryUrl
601 if(DALI_UNLIKELY(mAuxiliaryTextureId == TextureManager::INVALID_TEXTURE_ID))
603 // Special case when TextureManager.LoadTexture call LoadComplete function before mAuxiliaryTextureId setup.
604 // We can overwrite mAuxiliaryTextureId.
605 mAuxiliaryTextureId = textureInformation.textureId;
609 mAuxiliaryTextureSet = textureInformation.textureSet;
610 mAuxiliaryResourceStatus = Toolkit::Visual::ResourceStatus::READY;
614 mAuxiliaryResourceStatus = Toolkit::Visual::ResourceStatus::FAILED;
618 // If auxiliaryUrl didn't required OR auxiliaryUrl load done.
619 if(!mAuxiliaryUrl.IsValid() || mAuxiliaryResourceStatus != Toolkit::Visual::ResourceStatus::PREPARING)
622 // and.. If Url loading done.
623 if(mImpl->mRenderer && mLoader.GetNPatchData(mId, data) && data->GetLoadingState() != NPatchData::LoadingState::LOADING)
630 } // namespace Internal
632 } // namespace Toolkit