From dfeeefc6f3364ef28e076c2ec9b10686d615f72a Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Thu, 16 Feb 2023 21:03:24 +0530 Subject: [PATCH] Shorten NotifySwap path for offscreen rendering This commit shortens NotifySwap path by removing some of the changes in upstream code. w/o patch: SkiaOutputSurfaceImpl->Display(OutputSurfaceClient)-> RootCompositorFrameSinkImpl(DisplayClient)->FrameSinkManagerImpl-> HostFrameSinkManager(FrameSinkManagerClient)-> DelegatedFrameHost(HostFrameSinkClient)-> DelegatedFrameHostClientAura(DelegatedFrameHostClient)-> RenderWidgetHostViewAura->RWHVAuraOffscreenHelperEfl with patch: SkiaOutputSurfaceImpl->Display(OutputSurfaceClient)-> RootCompositorFrameSinkImpl(DisplayClient)-> HostDisplayClient(mojom::DisplayClient)->Compositor-> CompositorObserverEfl(CompositorObserver)-> RWHVAuraOffscreenHelperEfl Reference: https://review.tizen.org/gerrit/287806/ Change-Id: I5dbfad3a6bb8460804045c6a8b66bae1f74130ac Signed-off-by: Chandan Padhi --- components/viz/host/host_frame_sink_client.h | 3 -- components/viz/host/host_frame_sink_manager.cc | 12 ------- components/viz/host/host_frame_sink_manager.h | 5 --- .../service/frame_sinks/frame_sink_manager_impl.cc | 8 ----- .../service/frame_sinks/frame_sink_manager_impl.h | 4 --- .../frame_sinks/root_compositor_frame_sink_impl.cc | 4 +-- .../compositor/viz_process_transport_factory.cc | 6 ++++ .../browser/renderer_host/delegated_frame_host.cc | 6 ---- .../browser/renderer_host/delegated_frame_host.h | 7 ---- .../delegated_frame_host_client_aura.cc | 6 ---- .../delegated_frame_host_client_aura.h | 3 -- .../renderer_host/render_widget_host_view_aura.cc | 5 --- .../renderer_host/render_widget_host_view_aura.h | 1 - services/viz/privileged/mojom/compositing/BUILD.gn | 2 +- .../mojom/compositing/display_private.mojom | 3 ++ .../mojom/compositing/frame_sink_manager.mojom | 3 -- .../rwhv_aura_offscreen_helper_efl.cc | 1 + .../renderer_host/rwhv_aura_offscreen_helper_efl.h | 1 - .../ui/compositor/compositor_observer_efl.cc | 39 ++++++++++++++++++++ .../ui/compositor/compositor_observer_efl.h | 42 ++++++++++++++++++++++ tizen_src/chromium_impl/ui/ui_efl.gni | 7 +++- tizen_src/ewk/efl_integration/eweb_view.cc | 5 +++ tizen_src/ewk/efl_integration/eweb_view.h | 1 + ui/compositor/BUILD.gn | 8 +++++ ui/compositor/compositor.cc | 7 ++++ ui/compositor/compositor.h | 4 +++ ui/compositor/compositor_observer.h | 4 +++ 27 files changed, 129 insertions(+), 68 deletions(-) create mode 100644 tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.cc create mode 100644 tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.h diff --git a/components/viz/host/host_frame_sink_client.h b/components/viz/host/host_frame_sink_client.h index 9e04e64..288cf89 100644 --- a/components/viz/host/host_frame_sink_client.h +++ b/components/viz/host/host_frame_sink_client.h @@ -22,9 +22,6 @@ class HostFrameSinkClient { // Called when a CompositorFrame with a new frame token is provided. virtual void OnFrameTokenChanged(uint32_t frame_token, base::TimeTicks activation_time) = 0; -#if BUILDFLAG(IS_EFL) - virtual void NotifySwap(const uint32_t texture_id) {} -#endif protected: virtual ~HostFrameSinkClient() {} diff --git a/components/viz/host/host_frame_sink_manager.cc b/components/viz/host/host_frame_sink_manager.cc index 2e759a3..8d724ed 100644 --- a/components/viz/host/host_frame_sink_manager.cc +++ b/components/viz/host/host_frame_sink_manager.cc @@ -441,16 +441,4 @@ HostFrameSinkManager::FrameSinkData::~FrameSinkData() = default; HostFrameSinkManager::FrameSinkData& HostFrameSinkManager::FrameSinkData:: operator=(FrameSinkData&& other) = default; -#if BUILDFLAG(IS_EFL) -void HostFrameSinkManager::NotifySwap(const uint32_t texture_id, - const FrameSinkId& frame_sink_id) { - auto iter = frame_sink_data_map_.find(frame_sink_id); - if (iter != frame_sink_data_map_.end()) { - const FrameSinkData& data = iter->second; - if (data.client) - data.client->NotifySwap(texture_id); - } -} -#endif - } // namespace viz diff --git a/components/viz/host/host_frame_sink_manager.h b/components/viz/host/host_frame_sink_manager.h index b0cada9..0c8c1a6 100644 --- a/components/viz/host/host_frame_sink_manager.h +++ b/components/viz/host/host_frame_sink_manager.h @@ -295,11 +295,6 @@ class VIZ_HOST_EXPORT HostFrameSinkManager const bool enable_sync_window_destruction_; -#if BUILDFLAG(IS_EFL) - void NotifySwap(const uint32_t texture_id, - const FrameSinkId& frame_sink_id) override; -#endif - // Connections to/from FrameSinkManagerImpl. mojo::Remote frame_sink_manager_remote_; // This will point to |frame_sink_manager_remote_| if using mojo or it may diff --git a/components/viz/service/frame_sinks/frame_sink_manager_impl.cc b/components/viz/service/frame_sinks/frame_sink_manager_impl.cc index b95e558..7c25edc 100644 --- a/components/viz/service/frame_sinks/frame_sink_manager_impl.cc +++ b/components/viz/service/frame_sinks/frame_sink_manager_impl.cc @@ -808,12 +808,4 @@ void FrameSinkManagerImpl::ClearThrottling(const FrameSinkId& id) { UpdateThrottlingRecursively(id, base::TimeDelta()); } -#if BUILDFLAG(IS_EFL) -void FrameSinkManagerImpl::NotifySwap(const uint32_t texture_id, - const FrameSinkId& id) { - for (auto child : GetChildrenByParent(id)) - client_->NotifySwap(texture_id, child); -} -#endif - } // namespace viz diff --git a/components/viz/service/frame_sinks/frame_sink_manager_impl.h b/components/viz/service/frame_sinks/frame_sink_manager_impl.h index 418747b..aae01af 100644 --- a/components/viz/service/frame_sinks/frame_sink_manager_impl.h +++ b/components/viz/service/frame_sinks/frame_sink_manager_impl.h @@ -257,10 +257,6 @@ class VIZ_SERVICE_EXPORT FrameSinkManagerImpl bool VerifySandboxedThreadIds( base::flat_set thread_ids); -#if BUILDFLAG(IS_EFL) - void NotifySwap(const uint32_t texture_id, const FrameSinkId& id); -#endif - private: friend class FrameSinkManagerTest; diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc index 0b6f3f8..821d45b 100644 --- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc +++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc @@ -625,8 +625,8 @@ BeginFrameSource* RootCompositorFrameSinkImpl::begin_frame_source() { #if BUILDFLAG(IS_EFL) void RootCompositorFrameSinkImpl::NotifySwap(const uint32_t texture_id) { - support_->frame_sink_manager()->NotifySwap(texture_id, - support_->frame_sink_id()); + if (display_client_) + display_client_->NotifySwap(texture_id); } #endif diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc index 4c5bf12..5855d1e 100644 --- a/content/browser/compositor/viz_process_transport_factory.cc +++ b/content/browser/compositor/viz_process_transport_factory.cc @@ -124,6 +124,12 @@ class HostDisplayClient : public viz::HostDisplayClient { } #endif +#if BUILDFLAG(IS_EFL) + void NotifySwap(const uint32_t texture_id) override { + compositor_->NotifySwap(texture_id); + } +#endif + private: [[maybe_unused]] const raw_ptr compositor_; }; diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc index 2f07bdb..b089659 100644 --- a/content/browser/renderer_host/delegated_frame_host.cc +++ b/content/browser/renderer_host/delegated_frame_host.cc @@ -329,12 +329,6 @@ void DelegatedFrameHost::OnFrameTokenChanged(uint32_t frame_token, client_->OnFrameTokenChanged(frame_token, activation_time); } -#if BUILDFLAG(IS_EFL) -void DelegatedFrameHost::NotifySwap(const uint32_t texture_id) { - client_->NotifySwap(texture_id); -} -#endif - // CommitPending without a target for TakeFallbackContentFrom. Since we cannot // guarantee that Navigation will complete, evict our surfaces which are from // a previous Navigation. diff --git a/content/browser/renderer_host/delegated_frame_host.h b/content/browser/renderer_host/delegated_frame_host.h index 85e3aa2..7d55757 100644 --- a/content/browser/renderer_host/delegated_frame_host.h +++ b/content/browser/renderer_host/delegated_frame_host.h @@ -54,9 +54,6 @@ class CONTENT_EXPORT DelegatedFrameHostClient { virtual void InvalidateLocalSurfaceIdOnEviction() = 0; virtual std::vector CollectSurfaceIdsForEviction() = 0; virtual bool ShouldShowStaleContentOnEviction() = 0; -#if BUILDFLAG(IS_EFL) - virtual void NotifySwap(const uint32_t texture_id) {} -#endif }; // The DelegatedFrameHost is used to host all of the RenderWidgetHostView state @@ -108,10 +105,6 @@ class CONTENT_EXPORT DelegatedFrameHost void OnFrameTokenChanged(uint32_t frame_token, base::TimeTicks activation_time) override; -#if BUILDFLAG(IS_EFL) - void NotifySwap(const uint32_t texture_id) override; -#endif - // Public interface exposed to RenderWidgetHostView. // kOccluded means the native window for the host was diff --git a/content/browser/renderer_host/delegated_frame_host_client_aura.cc b/content/browser/renderer_host/delegated_frame_host_client_aura.cc index d667785..6e1b082 100644 --- a/content/browser/renderer_host/delegated_frame_host_client_aura.cc +++ b/content/browser/renderer_host/delegated_frame_host_client_aura.cc @@ -64,10 +64,4 @@ bool DelegatedFrameHostClientAura::ShouldShowStaleContentOnEviction() { return render_widget_host_view_->ShouldShowStaleContentOnEviction(); } -#if BUILDFLAG(IS_EFL) -void DelegatedFrameHostClientAura::NotifySwap(const uint32_t texture_id) { - render_widget_host_view_->NotifySwap(texture_id); -} -#endif - } // namespace content diff --git a/content/browser/renderer_host/delegated_frame_host_client_aura.h b/content/browser/renderer_host/delegated_frame_host_client_aura.h index 074e6e2..87a23e8 100644 --- a/content/browser/renderer_host/delegated_frame_host_client_aura.h +++ b/content/browser/renderer_host/delegated_frame_host_client_aura.h @@ -42,9 +42,6 @@ class CONTENT_EXPORT DelegatedFrameHostClientAura void InvalidateLocalSurfaceIdOnEviction() override; std::vector CollectSurfaceIdsForEviction() override; bool ShouldShowStaleContentOnEviction() override; -#if BUILDFLAG(IS_EFL) - void NotifySwap(const uint32_t texture_id) override; -#endif private: raw_ptr render_widget_host_view_; diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 133558d..21d097e 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -564,11 +564,6 @@ void RenderWidgetHostViewAura::BackgroundColorReceived(int callback_id, offscreen_helper_->BackgroundColorReceived(callback_id, bg_color); } -void RenderWidgetHostViewAura::NotifySwap(const uint32_t texture_id) { - if (offscreen_helper_) - offscreen_helper_->NotifySwap(texture_id); -} - void RenderWidgetHostViewAura::DidGetContentSnapshot(const SkBitmap& bitmap, int request_id) { if (offscreen_helper_) diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h index 014d829..701f9a2 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.h +++ b/content/browser/renderer_host/render_widget_host_view_aura.h @@ -422,7 +422,6 @@ class CONTENT_EXPORT RenderWidgetHostViewAura RWHVAuraOffscreenHelperEfl* offscreen_helper() { return offscreen_helper_.get(); } - void NotifySwap(const uint32_t texture_id); void DidGetContentSnapshot(const SkBitmap& bitmap, int request_id) override; void DidHandleKeyEvent(blink::WebInputEvent::Type input_event, bool processed) override; diff --git a/services/viz/privileged/mojom/compositing/BUILD.gn b/services/viz/privileged/mojom/compositing/BUILD.gn index 8a28eee..a7fe718 100644 --- a/services/viz/privileged/mojom/compositing/BUILD.gn +++ b/services/viz/privileged/mojom/compositing/BUILD.gn @@ -44,7 +44,7 @@ mojom("compositing") { enabled_features += [ "enable_cast_overlay_strategy" ] } if (use_efl) { - enabled_features += [ "use_efl" ] + enabled_features += [ "is_efl" ] } cpp_typemaps = [ diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom index 44e7dde..116905f 100644 --- a/services/viz/privileged/mojom/compositing/display_private.mojom +++ b/services/viz/privileged/mojom/compositing/display_private.mojom @@ -125,4 +125,7 @@ interface DisplayClient { [EnableIf=is_android] SetPreferredRefreshRate(float refresh_rate); + + [EnableIf=is_efl] + NotifySwap(uint32 texture_id); }; diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom index 2ac593f..5776b0b 100644 --- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom +++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom @@ -192,7 +192,4 @@ interface FrameSinkManagerClient { // when a surface of the provided |frame_sink_id| activates. OnFrameTokenChanged(FrameSinkId frame_sink_id, uint32 frame_token, mojo_base.mojom.TimeTicks activation_time); - - [EnableIf=use_efl] - NotifySwap(uint32 texture_id, FrameSinkId frame_sink_id); }; diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc index cf06dce..ee3e3f8 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.cc @@ -14,6 +14,7 @@ #include "content/browser/web_contents/web_contents_view_aura.h" #include "content/public/browser/render_widget_host_helper.h" #include "content/public/browser/web_contents_delegate.h" +#include "ecore_x_wayland_wrapper.h" #include "gpu/command_buffer/service/texture_base.h" #include "skia/ext/image_operations.h" #include "tizen/system_info.h" diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h index d462660..42ad061 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h +++ b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_offscreen_helper_efl.h @@ -14,7 +14,6 @@ #include #include #include -#include "ecore_x_wayland_wrapper.h" #include "base/callback.h" #include "base/containers/id_map.h" diff --git a/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.cc b/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.cc new file mode 100644 index 0000000..52dcb89 --- /dev/null +++ b/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.cc @@ -0,0 +1,39 @@ +// Copyright 2023 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/compositor/compositor_observer_efl.h" + +#include "content/browser/renderer_host/render_widget_host_view_aura.h" +#include "content/public/browser/web_contents.h" +#include "ui/compositor/compositor.h" + +namespace ui { + +CompositorObserverEfl::CompositorObserverEfl(ui::Compositor* compositor, + content::WebContents* web_contents) + : compositor_(compositor), web_contents_(web_contents) { + compositor_->AddObserver(this); +} + +CompositorObserverEfl::~CompositorObserverEfl() { + if (compositor_) + compositor_->RemoveObserver(this); +} + +void CompositorObserverEfl::NotifySwap(const uint32_t texture_id) { + auto* rwhva = static_cast( + web_contents_->GetRenderWidgetHostView()); + if (!rwhva || !rwhva->offscreen_helper()) + return; + + rwhva->offscreen_helper()->NotifySwap(texture_id); +} + +void CompositorObserverEfl::OnCompositingShuttingDown( + ui::Compositor* compositor) { + DCHECK_EQ(compositor, compositor_); + compositor_->RemoveObserver(this); + compositor_ = nullptr; +} +} // namespace ui diff --git a/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.h b/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.h new file mode 100644 index 0000000..2bf46b7 --- /dev/null +++ b/tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.h @@ -0,0 +1,42 @@ +// Copyright 2023 Samsung Electronics. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_COMPOSITOR_COMPOSITOR_OBSERVER_EFL_H_ +#define UI_COMPOSITOR_COMPOSITOR_OBSERVER_EFL_H_ + +#include "ui/compositor/compositor_export.h" +#include "ui/compositor/compositor_observer.h" + +namespace content { +class WebContents; +} // namespace content + +namespace ui { + +class Compositor; + +class COMPOSITOR_EXPORT CompositorObserverEfl : public CompositorObserver { + public: + CompositorObserverEfl(Compositor* compositor, + content::WebContents* web_contents); + + CompositorObserverEfl(const CompositorObserverEfl&) = delete; + CompositorObserverEfl& operator=(const CompositorObserverEfl&) = delete; + + ~CompositorObserverEfl() override; + + ui::Compositor* compositor() { return compositor_; } + + private: + // ui::CompositorObserver implementation: + void NotifySwap(const uint32_t texture_id) override; + void OnCompositingShuttingDown(Compositor* compositor) override; + + Compositor* compositor_; + content::WebContents* web_contents_; +}; + +} // namespace ui + +#endif // UI_COMPOSITOR_COMPOSITOR_OBSERVER_EFL_H_ diff --git a/tizen_src/chromium_impl/ui/ui_efl.gni b/tizen_src/chromium_impl/ui/ui_efl.gni index 1a0117f..7e08db0 100644 --- a/tizen_src/chromium_impl/ui/ui_efl.gni +++ b/tizen_src/chromium_impl/ui/ui_efl.gni @@ -134,4 +134,9 @@ if (!use_aura) { external_ui_accessiblility_platform_sources = [ "//tizen_src/chromium_impl/ui/accessibility/platform/ax_platform_node_efl.cc", "//tizen_src/chromium_impl/ui/accessibility/platform/ax_platform_node_efl.h", -] \ No newline at end of file +] + +external_ui_compositor_sources = [ + "//tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.cc", + "//tizen_src/chromium_impl/ui/compositor/compositor_observer_efl.h", +] diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index 5d6f3a4..76e4b48 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -77,6 +77,7 @@ #include "ui/aura/window.h" #include "ui/base/clipboard/clipboard_helper_efl.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/compositor/compositor_observer_efl.h" #include "ui/display/screen.h" #include "ui/events/event_switches.h" #include "ui/gfx/geometry/dip_util.h" @@ -435,6 +436,8 @@ EWebView::~EWebView() { context_menu_.reset(); mhtml_callback_map_.Clear(); + compositor_observer_.reset(); + // Release manually those scoped pointers to // make sure they are released in correct order web_contents_.reset(); @@ -2498,6 +2501,8 @@ void EWebView::InitializeWindowTreeHost() { std::make_unique(host_->window()); window_parenting_client_ = std::make_unique(host_->window()); + compositor_observer_ = std::make_unique( + host_->compositor(), web_contents_.get()); aura::Window* content = web_contents_->GetNativeView(); aura::Window* parent = host_->window(); diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 17cb0c3..571af8c 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -864,6 +864,7 @@ class EWebView { std::unique_ptr host_; std::unique_ptr focus_client_; std::unique_ptr window_parenting_client_; + std::unique_ptr compositor_observer_; content::DateTimeChooserEfl* date_time_chooser_ = nullptr; #if defined(TIZEN_ATK_SUPPORT) diff --git a/ui/compositor/BUILD.gn b/ui/compositor/BUILD.gn index d42dd37..cdf5544 100644 --- a/ui/compositor/BUILD.gn +++ b/ui/compositor/BUILD.gn @@ -5,6 +5,10 @@ import("//build/config/ui.gni") import("//testing/test.gni") +if (use_efl) { + import("//tizen_src/chromium_impl/ui/ui_efl.gni") +} + component("compositor") { sources = [ "animation_throughput_reporter.cc", @@ -87,6 +91,10 @@ component("compositor") { ] } + if (use_efl) { + sources += external_ui_compositor_sources + } + defines = [ "COMPOSITOR_IMPLEMENTATION" ] public_deps = [ "//cc" ] diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc index ea97a5f..16177cf 100644 --- a/ui/compositor/compositor.cc +++ b/ui/compositor/compositor.cc @@ -875,6 +875,13 @@ void Compositor::OnCompleteSwapWithNewSize(const gfx::Size& size) { } #endif +#if BUILDFLAG(IS_EFL) +void Compositor::NotifySwap(const uint32_t texture_id) { + for (auto& observer : observer_list_) + observer.NotifySwap(texture_id); +} +#endif + void Compositor::SetOutputIsSecure(bool output_is_secure) { output_is_secure_ = output_is_secure; if (display_private_) diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h index ad691e7..1fedaa1 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -424,6 +424,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, void OnCompleteSwapWithNewSize(const gfx::Size& size); #endif +#if BUILDFLAG(IS_EFL) + void NotifySwap(const uint32_t texture_id); +#endif + bool IsLocked() { return lock_manager_.IsLocked(); } void SetOutputIsSecure(bool output_is_secure); diff --git a/ui/compositor/compositor_observer.h b/ui/compositor/compositor_observer.h index 8e00a18..1814689 100644 --- a/ui/compositor/compositor_observer.h +++ b/ui/compositor/compositor_observer.h @@ -54,6 +54,10 @@ class COMPOSITOR_EXPORT CompositorObserver { const gfx::Size& size) {} #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) +#if BUILDFLAG(IS_EFL) + virtual void NotifySwap(const uint32_t texture_id) {} +#endif + // Called at the top of the compositor's destructor, to give observers a // chance to remove themselves. virtual void OnCompositingShuttingDown(Compositor* compositor) {} -- 2.7.4