From 79252be2e14cda4d4303fd8d2a9b6cb0ee41ad6a Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Wed, 25 Oct 2023 16:40:55 +0900 Subject: [PATCH] Revert "[Tizen] Make IsLoaded return false when SVG parse failed" This reverts commit c6e69ddd57f7ed8a1a364781a0378b65a3c57e7b. --- .../common/vector-image-renderer-impl.cpp | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) 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; } -- 2.7.4