From 10d49bb46258df943f7fa3cb54c477fcab1d62ce Mon Sep 17 00:00:00 2001 From: sunghyun kim Date: Wed, 27 Dec 2023 16:04:57 +0900 Subject: [PATCH] Revert "[Tizen] Add log if destroyed visual get some signal" This reverts commit 5269bb01cb3e40ab7316633d810f80f702e4ef16. --- .../animated-vector-image-visual.cpp | 12 --------- .../internal/visuals/image/image-visual.cpp | 5 ---- dali-toolkit/internal/visuals/svg/svg-visual.cpp | 6 +---- dali-toolkit/internal/visuals/visual-base-impl.cpp | 29 +++++++++++----------- 4 files changed, 15 insertions(+), 37 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 9311450..699c281 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 @@ -651,12 +651,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); @@ -681,12 +675,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 c190f00..9e18e36 100644 --- a/dali-toolkit/internal/visuals/image/image-visual.cpp +++ b/dali-toolkit/internal/visuals/image/image-visual.cpp @@ -1042,11 +1042,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) { EnablePreMultipliedAlpha(textureInformation.preMultiplied); diff --git a/dali-toolkit/internal/visuals/svg/svg-visual.cpp b/dali-toolkit/internal/visuals/svg/svg-visual.cpp index 15e4280..8d64c8f 100644 --- a/dali-toolkit/internal/visuals/svg/svg-visual.cpp +++ b/dali-toolkit/internal/visuals/svg/svg-visual.cpp @@ -360,11 +360,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