DSWindow: client can commit null buffer. 09/242309/1
authorSooChan Lim <sc1.lim@samsung.com>
Mon, 24 Aug 2020 07:57:29 +0000 (16:57 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Tue, 25 Aug 2020 12:35:53 +0000 (21:35 +0900)
Change-Id: I6a7b98d9151f70f68aec0b0ccbb9fd95ab437691

src/DSWindow/DSWindow.cpp

index 8673000..acf1e07 100644 (file)
@@ -206,22 +206,8 @@ void DSWindowPrivate::__onSurfaceCommitted(std::shared_ptr<DSWaylandSurfaceCommi
                __changedGeometry = false;
        }
 
-       std::shared_ptr<IDSBuffer> buffer = waylandSurfaceCommitInfo->getBuffer();
-       if (buffer) {
-               // TODO: set the size of window with the size of commit information
-               //       It could be changed by DSWindowShell policy later..
-               std::shared_ptr<stSize> bufferSize = buffer->getSize();
-               __committedW = bufferSize->w;
-               __committedH = bufferSize->h;
-
-#if 0 // temporary code - we have to use policy to decide window's size.
-               if ((__committedW != __w) ||
-                   (__committedH != __h))
-               {
-                       DSLOG_ERR("DSWindow", "Committed size (%d,%d) is not same to requested size(%d,%d)", bufferSize->w, bufferSize->h, __w, __h);
-                       return;
-               }
-#endif
+       if (waylandSurfaceCommitInfo->bufferChanged()) {
+               std::shared_ptr<IDSBuffer> buffer = waylandSurfaceCommitInfo->getBuffer();
 
                // emit a signal of the buffer changed
                pub->__bufferChangedSignal.emit(buffer);