From: Eunki, Hong Date: Wed, 25 Oct 2023 07:40:55 +0000 (+0900) Subject: Revert "[Tizen] Make IsLoaded return false when SVG parse failed" X-Git-Tag: accepted/tizen/unified/20231031.163528~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=79252be2e14cda4d4303fd8d2a9b6cb0ee41ad6a;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Revert "[Tizen] Make IsLoaded return false when SVG parse failed" This reverts commit c6e69ddd57f7ed8a1a364781a0378b65a3c57e7b. --- diff --git a/dali/internal/vector-image/common/vector-image-renderer-impl.cpp b/dali/internal/vector-image/common/vector-image-renderer-impl.cpp index fd96e1f..88414b7 100644 --- a/dali/internal/vector-image/common/vector-image-renderer-impl.cpp +++ b/dali/internal/vector-image/common/vector-image-renderer-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2023 Samsung Electronics Co., Ltd. + * Copyright (c) 2022 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -86,7 +86,6 @@ VectorImageRenderer::~VectorImageRenderer() if(mPicture) { delete(mPicture); - mPicture = nullptr; } tvg::Initializer::term(tvg::CanvasEngine::Sw); @@ -94,13 +93,11 @@ VectorImageRenderer::~VectorImageRenderer() if(mParsedImage) { nsvgDelete(mParsedImage); - mParsedImage = nullptr; } if(mRasterizer) { nsvgDeleteRasterizer(mRasterizer); - mRasterizer = nullptr; } #endif } @@ -121,7 +118,6 @@ void VectorImageRenderer::Initialize() bool VectorImageRenderer::Load(const Vector& data, float dpi) { Mutex::ScopedLock lock(mMutex); - #ifdef THORVG_SUPPORT if(!mSwCanvas) { @@ -170,14 +166,6 @@ bool VectorImageRenderer::Load(const Vector& data, float dpi) break; } } - - // Destroy mPicture and make it as nullptr, so we can notify that we fail to load svg file. - if(mParsedImage) - { - delete(mPicture); - mPicture = nullptr; - } - return false; } @@ -197,14 +185,6 @@ bool VectorImageRenderer::Load(const Vector& data, float dpi) if(!mParsedImage || !mParsedImage->shapes) { DALI_LOG_ERROR("VectorImageRenderer::Load: nsvgParse failed\n"); - - // Destroy mParsedImage and make it as nullptr, so we can notify that we fail to load svg file. - if(mParsedImage) - { - nsvgDelete(mParsedImage); - mParsedImage = nullptr; - } - return false; }