Revert "DSRenderViewDaliImpl: emit update signal when DSWindow destroyed." 95/242495/1
authorJoonbum Ko <joonbum.ko@samsung.com>
Thu, 27 Aug 2020 04:25:38 +0000 (13:25 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 27 Aug 2020 07:51:22 +0000 (16:51 +0900)
This reverts commit b2d52c11f9d584876887fb61d7ea2085627c2640.

Change-Id: I23afcb6fd0c6a850bd0098dd8c26b0bbba54b76a

src/DSRender/DSRenderViewDaliImpl.cpp
src/DSRender/DSRenderViewDaliImpl.h

index ef3c1f2..7cc724d 100644 (file)
@@ -84,8 +84,7 @@ Geometry DSRenderViewDaliImpl::CreateTexturedQuad()
 
 DSRenderViewDaliImpl::DSRenderViewDaliImpl(std::shared_ptr<DSWindow> window, Dali::OffscreenWindow offscreenWindow)
        : __window(window),
-         __offscreenWindow(offscreenWindow),
-         __windowDestroyed(false)
+         __offscreenWindow(offscreenWindow)
 {
        std::string fragmentShader = "#extension GL_OES_EGL_image_external:require\n";
        fragmentShader += FRAGMENT_SHADER;
@@ -105,7 +104,6 @@ DSRenderViewDaliImpl::DSRenderViewDaliImpl(std::shared_ptr<DSWindow> window, Dal
        offscreenWindow.Add(__textureViewActor);
 
        // callbacks
-       window->registerCallbackWindowDestroyed(this, std::bind(&DSRenderViewDaliImpl::__onWindowDestroyed, this, std::placeholders::_1));
        window->registerCallbackBufferChanged(this, std::bind(&DSRenderViewDaliImpl::__onWindowBufferChanged, this, std::placeholders::_1));
        window->registerCallbackWindowRaiseToTop(this, std::bind(&DSRenderViewDaliImpl::__onWindowRaiseToTopChanged, this, std::placeholders::_1));
        window->registerCallbackWindowLowerToBottom(this, std::bind(&DSRenderViewDaliImpl::__onWindowLowerToBottomChanged, this, std::placeholders::_1));
@@ -114,10 +112,8 @@ DSRenderViewDaliImpl::DSRenderViewDaliImpl(std::shared_ptr<DSWindow> window, Dal
 
 DSRenderViewDaliImpl::~DSRenderViewDaliImpl()
 {
-       if (!__windowDestroyed) {
-               __textureViewActor.RemoveRenderer(__renderer);
-               __offscreenWindow.Remove(__textureViewActor);
-       }
+       __textureViewActor.RemoveRenderer(__renderer);
+       __offscreenWindow.Remove(__textureViewActor);
 }
 
 bool DSRenderViewDaliImpl::setBuffer(std::shared_ptr<IDSBuffer> buffer)
@@ -160,18 +156,6 @@ void DSRenderViewDaliImpl::registerCallbackUpdated(DSObject *slot, std::function
        __updatedSignal.connect(slot, func);
 }
 
-void DSRenderViewDaliImpl::__onWindowDestroyed(void *data)
-{
-       DSLOG_INF("DSRenderViewDaliImpl", "__onWindowDestroyed.");
-
-       __textureViewActor.RemoveRenderer(__renderer);
-       __offscreenWindow.Remove(__textureViewActor);
-
-       __windowDestroyed = true;
-
-       __updatedSignal.emit(nullptr);
-}
-
 void DSRenderViewDaliImpl::__onWindowBufferChanged(std::shared_ptr<IDSBuffer> buffer)
 {
        if (buffer) {
index f982bc5..8ffd858 100644 (file)
@@ -48,7 +48,6 @@ public:
        Dali::Geometry CreateTexturedQuad();
 
 private:
-       void __onWindowDestroyed(void *data);
        void __onWindowBufferChanged(std::shared_ptr<IDSBuffer> buffer);
        void __onWindowRaiseToTopChanged(void *data);
        void __onWindowLowerToBottomChanged(void *data);
@@ -59,8 +58,6 @@ private:
        Dali::Renderer            __renderer;
        Dali::Actor               __textureViewActor;
 
-       bool                      __windowDestroyed;
-
        DSSignal<void *> __updatedSignal;
 };