From dd76d8f9d3f78f250ce35617d48fefbe1a163b78 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 20 Apr 2021 20:12:05 +0900 Subject: [PATCH] Revert "** Temporary patch for diagnosing some hideous bugs in Tizen **" This reverts commit 9996be4c047b5b3b9ced9fabe3c4b888ed795cff. Change-Id: Ib5f0ee8c5d63012863d22e3ba051278be6e99982 --- packaging/thorvg.spec | 2 -- src/lib/tvgCanvas.cpp | 8 -------- src/lib/tvgCanvasImpl.h | 8 -------- src/lib/tvgCommon.h | 3 --- src/lib/tvgInitializer.cpp | 8 -------- src/lib/tvgPaint.cpp | 6 +----- src/lib/tvgSceneImpl.h | 11 ----------- src/lib/tvgTaskScheduler.cpp | 5 +---- src/loaders/svg/tvgSvgLoader.cpp | 14 -------------- src/loaders/svg/tvgSvgSceneBuilder.cpp | 5 ----- src/meson.build | 3 +-- 11 files changed, 3 insertions(+), 70 deletions(-) diff --git a/packaging/thorvg.spec b/packaging/thorvg.spec index d3e1083..171cbec 100644 --- a/packaging/thorvg.spec +++ b/packaging/thorvg.spec @@ -9,8 +9,6 @@ Source0: %{name}-%{version}.tar.gz BuildRequires: pkgconfig BuildRequires: pkgconfig(glesv2) -BuildRequires: pkgconfig(dlog) - BuildRequires: meson BuildRequires: ninja Requires(post): /sbin/ldconfig diff --git a/src/lib/tvgCanvas.cpp b/src/lib/tvgCanvas.cpp index f886c74..309e205 100644 --- a/src/lib/tvgCanvas.cpp +++ b/src/lib/tvgCanvas.cpp @@ -51,32 +51,24 @@ Result Canvas::push(unique_ptr paint) noexcept Result Canvas::clear(bool free) noexcept { -dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Clear", this); - return pImpl->clear(free); } Result Canvas::draw() noexcept { -dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Draw", this); - return pImpl->draw(); } Result Canvas::update(Paint* paint) noexcept { -dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Update", this); - return pImpl->update(paint, false); } Result Canvas::sync() noexcept { -dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) Sync", this); - if (pImpl->renderer->sync()) return Result::Success; return Result::InsufficientCondition; diff --git a/src/lib/tvgCanvasImpl.h b/src/lib/tvgCanvasImpl.h index b5c22c8..2772a23 100644 --- a/src/lib/tvgCanvasImpl.h +++ b/src/lib/tvgCanvasImpl.h @@ -86,11 +86,9 @@ struct Canvas::Impl //Update single paint node if (paint) { - dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) update a paint(%p)", this, paint); paint->pImpl->update(*renderer, nullptr, 255, clips, flag); //Update all retained paint nodes } else { - dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) update paints count(%d)", this, paints.count); for (auto paint = paints.data; paint < (paints.data + paints.count); ++paint) { (*paint)->pImpl->update(*renderer, nullptr, 255, clips, flag); } @@ -98,8 +96,6 @@ struct Canvas::Impl refresh = false; - dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) update finished", this); - return Result::Success; } @@ -107,16 +103,12 @@ struct Canvas::Impl { if (!renderer || !renderer->preRender()) return Result::InsufficientCondition; - dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) draw paints count(%d)", this, paints.count); - for (auto paint = paints.data; paint < (paints.data + paints.count); ++paint) { if (!(*paint)->pImpl->render(*renderer)) return Result::InsufficientCondition; } if (!renderer->postRender()) return Result::InsufficientCondition; - dlog_print(DLOG_ERROR, LOG_TAG, "Canvas(%p) draw finished", this); - return Result::Success; } }; diff --git a/src/lib/tvgCommon.h b/src/lib/tvgCommon.h index 8fcb681..f5d4a6d 100644 --- a/src/lib/tvgCommon.h +++ b/src/lib/tvgCommon.h @@ -22,7 +22,6 @@ #ifndef _TVG_COMMON_H_ #define _TVG_COMMON_H_ -#include #include "config.h" #include "thorvg.h" @@ -32,8 +31,6 @@ using namespace tvg; #define FILL_ID_LINEAR 0 #define FILL_ID_RADIAL 1 -#define LOG_TAG "thorvg" - #define TVG_UNUSED __attribute__ ((__unused__)) #endif //_TVG_COMMON_H_ diff --git a/src/lib/tvgInitializer.cpp b/src/lib/tvgInitializer.cpp index 2d971ec..039048a 100644 --- a/src/lib/tvgInitializer.cpp +++ b/src/lib/tvgInitializer.cpp @@ -47,8 +47,6 @@ Result Initializer::init(CanvasEngine engine, uint32_t threads) noexcept { auto nonSupport = true; -dlog_print(DLOG_ERROR, LOG_TAG, "Inititlized!"); - if (static_cast(engine) & static_cast(CanvasEngine::Sw)) { #ifdef THORVG_SW_RASTER_SUPPORT if (!SwRenderer::init(threads)) return Result::InsufficientCondition; @@ -72,16 +70,12 @@ dlog_print(DLOG_ERROR, LOG_TAG, "Inititlized!"); TaskScheduler::init(threads); -dlog_print(DLOG_ERROR, LOG_TAG, "Inititlized! - Success"); - return Result::Success; } Result Initializer::term(CanvasEngine engine) noexcept { - dlog_print(DLOG_ERROR, LOG_TAG, "Terminiated!"); - if (_initCnt == 0) return Result::InsufficientCondition; auto nonSupport = true; @@ -109,7 +103,5 @@ Result Initializer::term(CanvasEngine engine) noexcept if (!LoaderMgr::term()) return Result::Unknown; -dlog_print(DLOG_ERROR, LOG_TAG, "Terminiated! - Success"); - return Result::Success; } diff --git a/src/lib/tvgPaint.cpp b/src/lib/tvgPaint.cpp index 7d73ceb..9b0aba7 100644 --- a/src/lib/tvgPaint.cpp +++ b/src/lib/tvgPaint.cpp @@ -164,8 +164,6 @@ bool Paint::Impl::render(RenderMethod& renderer) { Compositor* cmp = nullptr; -dlog_print(DLOG_ERROR, LOG_TAG, "render paint (%p) type(%d)", this, (int) this->type); - /* Note: only ClipPath is processed in update() step. Create a composition image. */ if (cmpTarget && cmpMethod != CompositeMethod::ClipPath) { @@ -196,8 +194,6 @@ void* Paint::Impl::update(RenderMethod& renderer, const RenderTransform* pTransf } } -dlog_print(DLOG_ERROR, LOG_TAG, "update paint (%p) type(%d)", this, (int) this->type); - /* 1. Composition Pre Processing */ void *cmpData = nullptr; RenderRegion viewport; @@ -320,4 +316,4 @@ Result Paint::opacity(uint8_t o) noexcept uint8_t Paint::opacity() const noexcept { return pImpl->opacity; -} +} \ No newline at end of file diff --git a/src/lib/tvgSceneImpl.h b/src/lib/tvgSceneImpl.h index 1ea5447..40f1e58 100644 --- a/src/lib/tvgSceneImpl.h +++ b/src/lib/tvgSceneImpl.h @@ -58,31 +58,22 @@ struct Scene::Impl void* update(RenderMethod &renderer, const RenderTransform* transform, uint32_t opacity, Array& clips, RenderUpdateFlag flag) { -dlog_print(DLOG_ERROR, LOG_TAG, "====> Update Scene(%p), paints count(%d)", this, paints.count); - /* Overriding opacity value. If this scene is half-translucent, It must do intermeidate composition with that opacity value. */ this->opacity = static_cast(opacity); if (needComposition(opacity)) opacity = 255; - for (auto paint = paints.data; paint < (paints.data + paints.count); ++paint) { (*paint)->pImpl->update(renderer, transform, opacity, clips, static_cast(flag)); } /* FXIME: it requires to return list of children engine data This is necessary for scene composition */ - -dlog_print(DLOG_ERROR, LOG_TAG, "<==== Update Scene(%p), paints count(%d)", this, paints.count); - return nullptr; } bool render(RenderMethod& renderer) { - -dlog_print(DLOG_ERROR, LOG_TAG, "====> Render Scene(%p), paints count(%d)", this, paints.count); - Compositor* cmp = nullptr; if (needComposition(opacity)) { @@ -96,8 +87,6 @@ dlog_print(DLOG_ERROR, LOG_TAG, "====> Render Scene(%p), paints count(%d)", this if (cmp) renderer.endComposite(cmp); -dlog_print(DLOG_ERROR, LOG_TAG, "<==== Render Scene(%p), paints count(%d)", this, paints.count); - return true; } diff --git a/src/lib/tvgTaskScheduler.cpp b/src/lib/tvgTaskScheduler.cpp index 97eb16b..63ac4de 100644 --- a/src/lib/tvgTaskScheduler.cpp +++ b/src/lib/tvgTaskScheduler.cpp @@ -167,9 +167,6 @@ static TaskSchedulerImpl* inst = nullptr; void TaskScheduler::init(unsigned threads) { if (inst) return; - -dlog_print(DLOG_ERROR, LOG_TAG, "Init TaskScheduler threads = %d", threads); - inst = new TaskSchedulerImpl(threads); } @@ -192,4 +189,4 @@ unsigned TaskScheduler::threads() { if (inst) return inst->threadCnt; return 0; -} +} \ No newline at end of file diff --git a/src/loaders/svg/tvgSvgLoader.cpp b/src/loaders/svg/tvgSvgLoader.cpp index cec4b7b..c842120 100644 --- a/src/loaders/svg/tvgSvgLoader.cpp +++ b/src/loaders/svg/tvgSvgLoader.cpp @@ -799,8 +799,6 @@ static Matrix* _parseTransformationMatrix(const char* value) char* str = (char*)value; char* end = str + strlen(str); - dlog_print(DLOG_ERROR, LOG_TAG, "_parseTransformationMatrix() - begin"); - while (str < end) { auto state = MatrixState::Unknown; @@ -864,15 +862,9 @@ static Matrix* _parseTransformationMatrix(const char* value) _matrixCompose(matrix, &tmp, matrix); } } - -dlog_print(DLOG_ERROR, LOG_TAG, "_parseTransformationMatrix() - end"); - return matrix; error: if (matrix) free(matrix); - -dlog_print(DLOG_ERROR, LOG_TAG, "_parseTransformationMatrix() - error"); - return nullptr; } @@ -2856,8 +2848,6 @@ bool SvgLoader::open(const string& path) this->size = filePath.size(); } - dlog_print(DLOG_ERROR, LOG_TAG, "SvgLoader open(%p) - %s", this, path.c_str()); - return header(); } @@ -2866,12 +2856,8 @@ bool SvgLoader::read() { if (!content || size == 0) return false; - dlog_print(DLOG_ERROR, LOG_TAG, "SvgLoader read(%p) - before", this); - TaskScheduler::request(this); - dlog_print(DLOG_ERROR, LOG_TAG, "SvgLoader read(%p) - after", this); - return true; } diff --git a/src/loaders/svg/tvgSvgSceneBuilder.cpp b/src/loaders/svg/tvgSvgSceneBuilder.cpp index 0648e2f..df73370 100644 --- a/src/loaders/svg/tvgSvgSceneBuilder.cpp +++ b/src/loaders/svg/tvgSvgSceneBuilder.cpp @@ -402,8 +402,6 @@ unique_ptr svgSceneBuild(SvgNode* node, float vx, float vy, float vw, flo { if (!node || (node->type != SvgNodeType::Doc)) return nullptr; - dlog_print(DLOG_ERROR, LOG_TAG, "svgSceneBuild() node(%p) - begin", node); - unique_ptr root; auto docNode = _sceneBuildHelper(node, vx, vy, vw, vh); float x, y, w, h; @@ -424,8 +422,5 @@ unique_ptr svgSceneBuild(SvgNode* node, float vx, float vy, float vw, flo } else { root = move(docNode); } - -dlog_print(DLOG_ERROR, LOG_TAG, "svgSceneBuild() - end"); - return root; } diff --git a/src/meson.build b/src/meson.build index d386e13..7e19d03 100644 --- a/src/meson.build +++ b/src/meson.build @@ -17,8 +17,7 @@ subdir('loaders') subdir('bindings') thread_dep = meson.get_compiler('cpp').find_library('pthread') -dlog_dep = dependency('dlog', required: false) -thorvg_lib_dep = [common_dep, loader_dep, binding_dep, thread_dep, dlog_dep] +thorvg_lib_dep = [common_dep, loader_dep, binding_dep, thread_dep] thorvg_lib = library( 'thorvg', -- 2.7.4