From: SooChan Lim Date: Thu, 9 Jul 2020 23:21:19 +0000 (+0900) Subject: DSCanvas: initialize RenderEngine with EcoreEvas implemenation X-Git-Tag: accepted/tizen/unified/20200820.213435~273 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F02%2F241602%2F1;p=platform%2Fcore%2Fuifw%2Flibds.git DSCanvas: initialize RenderEngine with EcoreEvas implemenation Change-Id: I9cf476b148994c94d231ef9c6691fe65a840334e --- diff --git a/src/DSCanvas/DSCanvas.cpp b/src/DSCanvas/DSCanvas.cpp index bc9f066..2552c0e 100644 --- a/src/DSCanvas/DSCanvas.cpp +++ b/src/DSCanvas/DSCanvas.cpp @@ -1,5 +1,7 @@ #include "DSCanvas.h" #include "DSCanvasPrivate.h" +#include "DSOutputImpl.h" +#include "DSRenderEngineEcoreEvasImpl.h" #include "DSDebugLog.h" namespace display_server @@ -36,7 +38,8 @@ DSCanvasPrivate::DSCanvasPrivate(DSCanvas *p_ptr) : DSObjectPrivate(p_ptr), __p_ptr(p_ptr), __policyArea(nullptr), - __displayArea(nullptr) + __displayArea(nullptr), + __RenderEngine(nullptr) {} DSCanvasPrivate::~DSCanvasPrivate() @@ -61,6 +64,25 @@ bool DSCanvasPrivate::attachDisplayArea(std::shared_ptr displayAr return false; } + auto output = displayArea->getOutput(); + if (!output) { + DSLOG_ERR("DSCanvasPrivate", "output is null."); + return false; + } + + auto outputImpl = std::dynamic_pointer_cast(output); // down-casting of std::shared_ptr + auto bufferQueue = outputImpl->getDisplayBufferQueue(); + if (!bufferQueue) { + DSLOG_ERR("DSCanvasPrivate", "bufferQueue is null."); + return false; + } + + __RenderEngine = std::make_shared(bufferQueue); + if (!__RenderEngine) { + DSLOG_ERR("DSCanvasPrivate", "__RenderEngine is null."); + return false; + } + __displayArea = displayArea; return true; diff --git a/src/DSCanvas/DSCanvasPrivate.h b/src/DSCanvas/DSCanvasPrivate.h index bded0a9..faef7e8 100644 --- a/src/DSCanvas/DSCanvasPrivate.h +++ b/src/DSCanvas/DSCanvasPrivate.h @@ -2,6 +2,7 @@ #define __DS_CANVAS_PRIVATE_H__ #include "DSCanvas.h" +#include "IDSRenderEngine.h" namespace display_server { @@ -20,6 +21,7 @@ public: private: std::shared_ptr __policyArea; std::shared_ptr __displayArea; + std::shared_ptr __RenderEngine; }; }