Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Unified Diff: services/ui/public/cpp/client_compositor_frame_sink.h

Issue 2875753002: Implement aura::WindowPortMus::CreateCompositorFrameSink() (Closed)
Patch Set: WIP Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: services/ui/public/cpp/client_compositor_frame_sink.h
diff --git a/services/ui/public/cpp/client_compositor_frame_sink.h b/services/ui/public/cpp/client_compositor_frame_sink.h
index af5f13a09c3af064a5a3ff992b1b2d64f5e8922d..7b7789f1a9def907c50456ab10dc2496f98ad531 100644
--- a/services/ui/public/cpp/client_compositor_frame_sink.h
+++ b/services/ui/public/cpp/client_compositor_frame_sink.h
@@ -5,6 +5,7 @@
#ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_COMPOSITOR_FRAME_SINK_H_
#define SERVICES_UI_PUBLIC_CPP_WINDOW_COMPOSITOR_FRAME_SINK_H_
+#include "base/callback.h"
#include "base/macros.h"
#include "cc/ipc/mojo_compositor_frame_sink.mojom.h"
#include "cc/output/compositor_frame_sink.h"
@@ -25,7 +26,6 @@ class ClientCompositorFrameSink
public:
// static
static std::unique_ptr<ClientCompositorFrameSink> Create(
- const cc::FrameSinkId& frame_sink_id,
scoped_refptr<cc::ContextProvider> context_provider,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
std::unique_ptr<ClientCompositorFrameSinkBinding>*
@@ -33,6 +33,11 @@ class ClientCompositorFrameSink
~ClientCompositorFrameSink() override;
+ using SurfaceChangedCallback =
+ base::Callback<void(const cc::LocalSurfaceId&, const gfx::Size&)>;
+ // Set a callback which will be called when the surface is changed.
+ void SetSurfaceChangedCallback(const SurfaceChangedCallback& callback);
+
// cc::CompositorFrameSink implementation.
bool BindToClient(cc::CompositorFrameSinkClient* client) override;
void DetachFromClient() override;
@@ -41,7 +46,6 @@ class ClientCompositorFrameSink
private:
ClientCompositorFrameSink(
- const cc::FrameSinkId& frame_sink_id,
scoped_refptr<cc::ContextProvider> context_provider,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
cc::mojom::MojoCompositorFrameSinkPtrInfo compositor_frame_sink_info,
@@ -67,8 +71,8 @@ class ClientCompositorFrameSink
std::unique_ptr<mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient>>
client_binding_;
std::unique_ptr<base::ThreadChecker> thread_checker_;
- const cc::FrameSinkId frame_sink_id_;
bool enable_surface_synchronization_ = false;
+ SurfaceChangedCallback surface_changed_callback_;
DISALLOW_COPY_AND_ASSIGN(ClientCompositorFrameSink);
};

Powered by Google App Engine
This is Rietveld 408576698