fixup! Shorten NotifySwap path for offscreen rendering 06/289206/7
authorYongGeol Jung <yg48.jung@samsung.com>
Thu, 2 Mar 2023 11:40:14 +0000 (03:40 -0800)
committerBot Blink <blinkbot@samsung.com>
Fri, 3 Mar 2023 19:03:56 +0000 (19:03 +0000)
Create |CompositorObserverEfl| to get |NotifySwap| message for WRT offscreen
mode.

Change-Id: Ie2b75929e2d5c386f13838352bdaf859aae04ce7

wrt/src/browser/wrt_native_window.cc
wrt/src/browser/wrt_native_window.h

index aebad9d..7295c7b 100755 (executable)
@@ -27,6 +27,7 @@
 #include "electron/shell/common/options_switches.h"
 #include "tizen_src/chromium_impl/efl/window_factory.h"
 #include "tizen_src/chromium_impl/tizen/system_info.h"
+#include "ui/compositor/compositor_observer_efl.h"
 #include "ui/display/screen.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/geometry/size.h"
@@ -671,6 +672,10 @@ void WRTNativeWindow::SetWebContents(content::WebContents* web_contents) {
   EWebAccessibilityUtil::GetInstance()->SetEWebAccessibility(
       wrt_accessibility_.get());
 #endif
+  if (!use_onscreen_rendering) {
+    compositor_observer_ = std::make_unique<ui::CompositorObserverEfl>(
+        host->compositor(), web_contents_);
+  }
 }
 
 content::WebContents* WRTNativeWindow::GetWebContents() {
index f49195c..0331df3 100755 (executable)
@@ -20,6 +20,10 @@ class WebContentsViewAura;
 
 } // namespace content
 
+namespace ui {
+class CompositorObserver;
+}
+
 class EWebAccessibility;
 typedef struct _Ecore_Evas Ecore_Evas;
 typedef struct _Eo_Opaque Evas_Object;
@@ -207,6 +211,7 @@ class WRTNativeWindow : public electron::NativeWindow {
 #if !defined(WRT_JS_BRINGUP)
   std::unique_ptr<EWebAccessibility> wrt_accessibility_;
 #endif
+  std::unique_ptr<ui::CompositorObserver> compositor_observer_;
 };
 
 }  // namespace wrt