Revert "** Temporary patch for diagnosing some hideous bugs in Tizen **" 81/257181/1
authorHermet Park <chuneon.park@samsung.com>
Tue, 20 Apr 2021 11:12:05 +0000 (20:12 +0900)
committerHermet Park <chuneon.park@samsung.com>
Tue, 20 Apr 2021 11:12:05 +0000 (20:12 +0900)
This reverts commit 9996be4c047b5b3b9ced9fabe3c4b888ed795cff.

Change-Id: Ib5f0ee8c5d63012863d22e3ba051278be6e99982

packaging/thorvg.spec
src/lib/tvgCanvas.cpp
src/lib/tvgCanvasImpl.h
src/lib/tvgCommon.h
src/lib/tvgInitializer.cpp
src/lib/tvgPaint.cpp
src/lib/tvgSceneImpl.h
src/lib/tvgTaskScheduler.cpp
src/loaders/svg/tvgSvgLoader.cpp
src/loaders/svg/tvgSvgSceneBuilder.cpp
src/meson.build

index d3e1083..171cbec 100644 (file)
@@ -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
index f886c74..309e205 100644 (file)
@@ -51,32 +51,24 @@ Result Canvas::push(unique_ptr<Paint> 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;
index b5c22c8..2772a23 100644 (file)
@@ -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;
     }
 };
index 8fcb681..f5d4a6d 100644 (file)
@@ -22,7 +22,6 @@
 #ifndef _TVG_COMMON_H_
 #define _TVG_COMMON_H_
 
-#include <dlog.h>
 #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_
index 2d971ec..039048a 100644 (file)
@@ -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<uint32_t>(engine) & static_cast<uint32_t>(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;
 }
index 7d73ceb..9b0aba7 100644 (file)
@@ -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
index 1ea5447..40f1e58 100644 (file)
@@ -58,31 +58,22 @@ struct Scene::Impl
 
     void* update(RenderMethod &renderer, const RenderTransform* transform, uint32_t opacity, Array<RenderData>& 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<uint8_t>(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<uint32_t>(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;
     }
 
index 97eb16b..63ac4de 100644 (file)
@@ -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
index cec4b7b..c842120 100644 (file)
@@ -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;
 }
 
index 0648e2f..df73370 100644 (file)
@@ -402,8 +402,6 @@ unique_ptr<Scene> 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<Scene> root;
     auto docNode = _sceneBuildHelper(node, vx, vy, vw, vh);
     float x, y, w, h;
@@ -424,8 +422,5 @@ unique_ptr<Scene> svgSceneBuild(SvgNode* node, float vx, float vy, float vw, flo
     } else {
         root = move(docNode);
     }
-
-dlog_print(DLOG_ERROR, LOG_TAG, "svgSceneBuild() - end");
-
     return root;
 }
index d386e13..7e19d03 100644 (file)
@@ -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',