Remove the replacing surface code 98/255898/2
authorDaekwang Ryu <dkdk.ryu@samsung.com>
Thu, 25 Mar 2021 02:34:48 +0000 (11:34 +0900)
committerDaekwang Ryu <dkdk.ryu@samsung.com>
Thu, 25 Mar 2021 05:12:30 +0000 (14:12 +0900)
Replacing surface code in NativeRenderSurface is a legacy.

Change-Id: I0a8eb58f3210732df7d03b4d7c498786378171c4

dali/integration-api/adaptor-framework/native-render-surface.h
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h

index cca13ea..c15f139 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_NATIVE_RENDER_SURFACE_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -56,12 +56,6 @@ public: // API
   virtual void SetRenderNotification(TriggerEventInterface* renderNotification) = 0;
 
   /**
-   * @brief Waits until surface is replaced
-   * After tbm surface is acquired in PostRender, this function is finished.
-   */
-  virtual void WaitUntilSurfaceReplaced() = 0;
-
-  /**
    * @brief Get the native renderable handle
    * @return The native renderable handle
    */
index 3d9e316..ce439ba 100644 (file)
@@ -58,7 +58,6 @@ NativeRenderSurfaceEcoreWl::NativeRenderSurfaceEcoreWl(SurfaceSize surfaceSize,
   mEGLSurface(nullptr),
   mEGLContext(nullptr),
   mOwnSurface(false),
-  mDrawableCompleted(false),
   mTbmQueue(NULL),
   mConsumeSurface(NULL),
   mThreadSynchronization(NULL)
@@ -119,17 +118,6 @@ void NativeRenderSurfaceEcoreWl::SetRenderNotification(TriggerEventInterface* re
   mRenderNotification = renderNotification;
 }
 
-void NativeRenderSurfaceEcoreWl::WaitUntilSurfaceReplaced()
-{
-  ConditionalWait::ScopedLock lock(mTbmSurfaceCondition);
-  while(!mDrawableCompleted)
-  {
-    mTbmSurfaceCondition.Wait(lock);
-  }
-
-  mDrawableCompleted = false;
-}
-
 Any NativeRenderSurfaceEcoreWl::GetNativeRenderable()
 {
   return mTbmQueue;
@@ -276,15 +264,8 @@ void NativeRenderSurfaceEcoreWl::PostRender(bool renderToFbo, bool replacingSurf
       tbm_surface_internal_ref(mConsumeSurface);
     }
 
-    if(replacingSurface)
-    {
-      ConditionalWait::ScopedLock lock(mTbmSurfaceCondition);
-      mDrawableCompleted = true;
-      mTbmSurfaceCondition.Notify(lock);
-    }
-
     // create damage for client applications which wish to know the update timing
-    if(!replacingSurface && mRenderNotification)
+    if(mRenderNotification)
     {
       // use notification trigger
       // Tell the event-thread to render the tbm_surface
@@ -303,7 +284,7 @@ void NativeRenderSurfaceEcoreWl::PostRender(bool renderToFbo, bool replacingSurf
   else
   {
     // create damage for client applications which wish to know the update timing
-    if(!replacingSurface && mRenderNotification)
+    if(mRenderNotification)
     {
       // use notification trigger
       // Tell the event-thread to render the tbm_surface
index 12c5cf4..9561801 100644 (file)
@@ -65,11 +65,6 @@ public: // from WindowRenderSurface
   void SetRenderNotification(TriggerEventInterface* renderNotification) override;
 
   /**
-   * @copydoc Dali::NativeRenderSurface::WaitUntilSurfaceReplaced()
-   */
-  void WaitUntilSurfaceReplaced() override;
-
-  /**
    * @copydoc Dali::NativeRenderSurface::GetNativeRenderable()
    */
   virtual Any GetNativeRenderable() override;
@@ -186,12 +181,10 @@ private: // Data
   ColorDepth                            mColorDepth;
   tbm_format                            mTbmFormat;
   bool                                  mOwnSurface;
-  bool                                  mDrawableCompleted;
 
   tbm_surface_queue_h             mTbmQueue;
   tbm_surface_h                   mConsumeSurface;
   ThreadSynchronizationInterface* mThreadSynchronization; ///< A pointer to the thread-synchronization
-  ConditionalWait                 mTbmSurfaceCondition;
 };
 
 } // namespace Dali