From a65201b69485044d83eb305a33a08c0be729f9c4 Mon Sep 17 00:00:00 2001 From: "dongsug.song" Date: Mon, 6 Nov 2023 19:18:58 +0900 Subject: [PATCH] Revert "[Tizen] Add log if destroyed visual get some signal" This reverts commit 356d1e297ee3383c503f1473c1c2d8bc84944517. --- .../animated-vector-image-visual.cpp | 12 ------ .../internal/visuals/image/image-visual.cpp | 50 ++++++++++------------ dali-toolkit/internal/visuals/svg/svg-visual.cpp | 6 +-- dali-toolkit/internal/visuals/visual-base-impl.cpp | 29 ++++++------- 4 files changed, 37 insertions(+), 60 deletions(-) diff --git a/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp b/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp index 8fe2839..982d6dd 100644 --- a/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp +++ b/dali-toolkit/internal/visuals/animated-vector-image/animated-vector-image-visual.cpp @@ -628,12 +628,6 @@ void AnimatedVectorImageVisual::OnResourceReady(VectorAnimationTask::ResourceSta void AnimatedVectorImageVisual::OnAnimationFinished() { - if(DALI_UNLIKELY(mImpl == nullptr)) - { - DALI_LOG_ERROR("Fatal error!! already destroyed object callback called! AnimatedVectorImageVisual : %p, url : %s\n", this, mImageUrl.GetUrl().c_str()); - return; - } - AnimatedVectorImageVisualPtr self = this; // Keep reference until this API finished DALI_LOG_INFO(gVectorAnimationLogFilter, Debug::Verbose, "AnimatedVectorImageVisual::OnAnimationFinished: action state = %d [%p]\n", mPlayState, this); @@ -658,12 +652,6 @@ void AnimatedVectorImageVisual::OnAnimationFinished() void AnimatedVectorImageVisual::SendAnimationData() { - if(DALI_UNLIKELY(mImpl == nullptr)) - { - DALI_LOG_ERROR("Fatal error!! already destroyed object callback called! AnimatedVectorImageVisual : %p, url : %s\n", this, mImageUrl.GetUrl().c_str()); - return; - } - if(mAnimationData.resendFlag) { mVectorAnimationTask->SetAnimationData(mAnimationData); diff --git a/dali-toolkit/internal/visuals/image/image-visual.cpp b/dali-toolkit/internal/visuals/image/image-visual.cpp index c57ac33..fd0f2b7 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.cpp +++ b/dali-toolkit/internal/visuals/image/image-visual.cpp @@ -104,31 +104,31 @@ constexpr uint32_t TEXTURE_COUNT_FOR_GPU_ALPHA_MASK = 2u; struct NameIndexMatch { const char* const name; - Property::Index index; + Property::Index index; }; const NameIndexMatch NAME_INDEX_MATCH_TABLE[] = - { - {IMAGE_FITTING_MODE, Toolkit::ImageVisual::Property::FITTING_MODE}, - {IMAGE_SAMPLING_MODE, Toolkit::ImageVisual::Property::SAMPLING_MODE}, - {IMAGE_DESIRED_WIDTH, Toolkit::ImageVisual::Property::DESIRED_WIDTH}, - {IMAGE_DESIRED_HEIGHT, Toolkit::ImageVisual::Property::DESIRED_HEIGHT}, - {PIXEL_AREA_UNIFORM_NAME, Toolkit::ImageVisual::Property::PIXEL_AREA}, - {IMAGE_WRAP_MODE_U, Toolkit::ImageVisual::Property::WRAP_MODE_U}, - {IMAGE_WRAP_MODE_V, Toolkit::ImageVisual::Property::WRAP_MODE_V}, - {SYNCHRONOUS_LOADING, Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING}, - {IMAGE_ATLASING, Toolkit::ImageVisual::Property::ATLASING}, - {ALPHA_MASK_URL, Toolkit::ImageVisual::Property::ALPHA_MASK_URL}, - {MASK_CONTENT_SCALE_NAME, Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE}, - {CROP_TO_MASK_NAME, Toolkit::ImageVisual::Property::CROP_TO_MASK}, - {MASKING_TYPE_NAME, Toolkit::DevelImageVisual::Property::MASKING_TYPE}, - {ENABLE_BROKEN_IMAGE, Toolkit::DevelImageVisual::Property::ENABLE_BROKEN_IMAGE}, - {LOAD_POLICY_NAME, Toolkit::ImageVisual::Property::LOAD_POLICY}, - {RELEASE_POLICY_NAME, Toolkit::ImageVisual::Property::RELEASE_POLICY}, - {ORIENTATION_CORRECTION_NAME, Toolkit::ImageVisual::Property::ORIENTATION_CORRECTION}, - {FAST_TRACK_UPLOADING_NAME, Toolkit::DevelImageVisual::Property::FAST_TRACK_UPLOADING}, +{ + {IMAGE_FITTING_MODE, Toolkit::ImageVisual::Property::FITTING_MODE}, + {IMAGE_SAMPLING_MODE, Toolkit::ImageVisual::Property::SAMPLING_MODE}, + {IMAGE_DESIRED_WIDTH, Toolkit::ImageVisual::Property::DESIRED_WIDTH}, + {IMAGE_DESIRED_HEIGHT, Toolkit::ImageVisual::Property::DESIRED_HEIGHT}, + {PIXEL_AREA_UNIFORM_NAME, Toolkit::ImageVisual::Property::PIXEL_AREA}, + {IMAGE_WRAP_MODE_U, Toolkit::ImageVisual::Property::WRAP_MODE_U}, + {IMAGE_WRAP_MODE_V, Toolkit::ImageVisual::Property::WRAP_MODE_V}, + {SYNCHRONOUS_LOADING, Toolkit::ImageVisual::Property::SYNCHRONOUS_LOADING}, + {IMAGE_ATLASING, Toolkit::ImageVisual::Property::ATLASING}, + {ALPHA_MASK_URL, Toolkit::ImageVisual::Property::ALPHA_MASK_URL}, + {MASK_CONTENT_SCALE_NAME, Toolkit::ImageVisual::Property::MASK_CONTENT_SCALE}, + {CROP_TO_MASK_NAME, Toolkit::ImageVisual::Property::CROP_TO_MASK}, + {MASKING_TYPE_NAME, Toolkit::DevelImageVisual::Property::MASKING_TYPE}, + {ENABLE_BROKEN_IMAGE, Toolkit::DevelImageVisual::Property::ENABLE_BROKEN_IMAGE}, + {LOAD_POLICY_NAME, Toolkit::ImageVisual::Property::LOAD_POLICY}, + {RELEASE_POLICY_NAME, Toolkit::ImageVisual::Property::RELEASE_POLICY}, + {ORIENTATION_CORRECTION_NAME, Toolkit::ImageVisual::Property::ORIENTATION_CORRECTION}, + {FAST_TRACK_UPLOADING_NAME, Toolkit::DevelImageVisual::Property::FAST_TRACK_UPLOADING}, }; -const int NAME_INDEX_MATCH_TABLE_SIZE = sizeof(NAME_INDEX_MATCH_TABLE) / sizeof(NAME_INDEX_MATCH_TABLE[0]); +const int NAME_INDEX_MATCH_TABLE_SIZE = sizeof(NAME_INDEX_MATCH_TABLE)/sizeof(NAME_INDEX_MATCH_TABLE[0]); Geometry CreateGeometry(VisualFactoryCache& factoryCache, ImageDimensions gridSize) { @@ -137,8 +137,7 @@ Geometry CreateGeometry(VisualFactoryCache& factoryCache, ImageDimensions gridSi if(gridSize == ImageDimensions(1, 1)) { geometry = factoryCache.GetGeometry(VisualFactoryCache::QUAD_GEOMETRY); - } - else + } else { geometry = VisualFactoryCache::CreateGridGeometry(gridSize); } @@ -1042,11 +1041,6 @@ void ImageVisual::FastLoadComplete(FastTrackLoadingTaskPtr task) void ImageVisual::LoadComplete(bool loadingSuccess, TextureInformation textureInformation) { Toolkit::Visual::ResourceStatus resourceStatus; - if(DALI_UNLIKELY(mImpl == nullptr)) - { - DALI_LOG_ERROR("Fatal error!! already destroyed object callback called! ImageVisual : %p, url : %s\n", this, mImageUrl.GetUrl().c_str()); - return; - } if(mImpl->mRenderer) { if(textureInformation.useAtlasing) diff --git a/dali-toolkit/internal/visuals/svg/svg-visual.cpp b/dali-toolkit/internal/visuals/svg/svg-visual.cpp index 3d5548c..33b7781 100644 --- a/dali-toolkit/internal/visuals/svg/svg-visual.cpp +++ b/dali-toolkit/internal/visuals/svg/svg-visual.cpp @@ -341,11 +341,7 @@ void SvgVisual::AddRasterizationTask(const Vector2& size) void SvgVisual::ApplyRasterizedImage(SvgTaskPtr task) { - if(DALI_UNLIKELY(mImpl == nullptr)) - { - DALI_LOG_ERROR("Fatal error!! already destroyed object callback called! SvgVisual : %p, url : %s, task : %p\n", this, mImageUrl.GetUrl().c_str(), task.Get()); - return; - } + SvgVisualPtr self = this; // Keep reference until this API finished if(task->HasSucceeded()) { diff --git a/dali-toolkit/internal/visuals/visual-base-impl.cpp b/dali-toolkit/internal/visuals/visual-base-impl.cpp index e270fa5..4710df4 100644 --- a/dali-toolkit/internal/visuals/visual-base-impl.cpp +++ b/dali-toolkit/internal/visuals/visual-base-impl.cpp @@ -119,21 +119,21 @@ static bool IsTypeAvailableForBorderline(Toolkit::Visual::Type type) struct StringProperty { const char* const name; - Property::Index index; + Property::Index index; }; -StringProperty PROPERTY_NAME_INDEX_TABLE[] = - { - {CUSTOM_SHADER, Toolkit::Visual::Property::SHADER}, - {TRANSFORM, Toolkit::Visual::Property::TRANSFORM}, - {PREMULTIPLIED_ALPHA, Toolkit::Visual::Property::PREMULTIPLIED_ALPHA}, - {MIX_COLOR, Toolkit::Visual::Property::MIX_COLOR}, - {OPACITY, Toolkit::Visual::Property::OPACITY}, - {VISUAL_FITTING_MODE, Toolkit::DevelVisual::Property::VISUAL_FITTING_MODE}, - {BORDERLINE_WIDTH, Toolkit::DevelVisual::Property::BORDERLINE_WIDTH}, - {BORDERLINE_COLOR, Toolkit::DevelVisual::Property::BORDERLINE_COLOR}, - {BORDERLINE_OFFSET, Toolkit::DevelVisual::Property::BORDERLINE_OFFSET}, - {CORNER_RADIUS, Toolkit::DevelVisual::Property::CORNER_RADIUS}, - {CORNER_RADIUS_POLICY, Toolkit::DevelVisual::Property::CORNER_RADIUS_POLICY}, +StringProperty PROPERTY_NAME_INDEX_TABLE[]= +{ + {CUSTOM_SHADER, Toolkit::Visual::Property::SHADER}, + {TRANSFORM, Toolkit::Visual::Property::TRANSFORM}, + {PREMULTIPLIED_ALPHA, Toolkit::Visual::Property::PREMULTIPLIED_ALPHA}, + {MIX_COLOR, Toolkit::Visual::Property::MIX_COLOR}, + {OPACITY, Toolkit::Visual::Property::OPACITY}, + {VISUAL_FITTING_MODE, Toolkit::DevelVisual::Property::VISUAL_FITTING_MODE}, + {BORDERLINE_WIDTH, Toolkit::DevelVisual::Property::BORDERLINE_WIDTH}, + {BORDERLINE_COLOR, Toolkit::DevelVisual::Property::BORDERLINE_COLOR}, + {BORDERLINE_OFFSET, Toolkit::DevelVisual::Property::BORDERLINE_OFFSET}, + {CORNER_RADIUS, Toolkit::DevelVisual::Property::CORNER_RADIUS}, + {CORNER_RADIUS_POLICY, Toolkit::DevelVisual::Property::CORNER_RADIUS_POLICY}, }; const uint16_t PROPERTY_NAME_INDEX_TABLE_COUNT = sizeof(PROPERTY_NAME_INDEX_TABLE) / sizeof(PROPERTY_NAME_INDEX_TABLE[0]); @@ -164,7 +164,6 @@ Visual::Base::Base(VisualFactoryCache& factoryCache, FittingMode fittingMode, To Visual::Base::~Base() { delete mImpl; - mImpl = nullptr; } void Visual::Base::Initialize() -- 2.7.4