CanvasRenderer: Refactoring tvgObject management 75/258475/3
authorJunsuChoi <jsuya.choi@samsung.com>
Tue, 18 May 2021 08:08:45 +0000 (17:08 +0900)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 20 May 2021 04:23:56 +0000 (13:23 +0900)
commit208e2c517e8e8fa6364768be5fd56f73f89f7ebd
tree11985deed26ef5434e60c4e61fe49bcce9406bf2
parent0b4e0176b41f88be8c5408d1134ad6a374bb7bf3
CanvasRenderer: Refactoring tvgObject management

Thorvg is designed for immediate rendering, tvg objects use unique ptr.
However, CanvasRenderer, Shape, Drawable, and DrawableGroup inherit BaseHandle
and work according to the lifecycle of Dali objects.
CanvasRenderer classes unnecessarily checks whether tvgObject is deleted.
So we don't push each in each AddDrawable method. Just before drawing,
we clear the canvas and push all the objects managed by the list directly.

The memory of the pushed object is managed in the canvas.
Each Drawable class only needs to manage its own tvg object.

Change-Id: If6c8d08b02c32ef6e359292cdc048e81214a99e7
18 files changed:
dali/internal/canvas-renderer/common/drawable-group-impl.cpp
dali/internal/canvas-renderer/common/drawable-group-impl.h
dali/internal/canvas-renderer/common/drawable-impl.cpp
dali/internal/canvas-renderer/common/drawable-impl.h
dali/internal/canvas-renderer/tizen/canvas-renderer-impl-tizen.cpp
dali/internal/canvas-renderer/tizen/canvas-renderer-impl-tizen.h
dali/internal/canvas-renderer/tizen/drawable-group-impl-tizen.cpp
dali/internal/canvas-renderer/tizen/drawable-group-impl-tizen.h
dali/internal/canvas-renderer/tizen/drawable-impl-tizen.cpp
dali/internal/canvas-renderer/tizen/drawable-impl-tizen.h
dali/internal/canvas-renderer/tizen/shape-impl-tizen.cpp
dali/internal/canvas-renderer/ubuntu/canvas-renderer-impl-ubuntu.cpp
dali/internal/canvas-renderer/ubuntu/canvas-renderer-impl-ubuntu.h
dali/internal/canvas-renderer/ubuntu/drawable-group-impl-ubuntu.cpp
dali/internal/canvas-renderer/ubuntu/drawable-group-impl-ubuntu.h
dali/internal/canvas-renderer/ubuntu/drawable-impl-ubuntu.cpp
dali/internal/canvas-renderer/ubuntu/drawable-impl-ubuntu.h
dali/internal/canvas-renderer/ubuntu/shape-impl-ubuntu.cpp