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

Unified Diff: components/display_compositor/gpu_display_compositor_frame_sink.h

Issue 2683583005: Move display_ From CompositorFrameSinkSupport To GpuDisplayCompositorFrameSink (Closed)
Patch Set: rebase Created 3 years, 10 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: components/display_compositor/gpu_display_compositor_frame_sink.h
diff --git a/components/display_compositor/gpu_display_compositor_frame_sink.h b/components/display_compositor/gpu_display_compositor_frame_sink.h
index 588ef754612b7d05ac9ef1cc9d1c5c452e2d7d3a..92735df3ee3723e34a4b167df54236ccf454b2e1 100644
--- a/components/display_compositor/gpu_display_compositor_frame_sink.h
+++ b/components/display_compositor/gpu_display_compositor_frame_sink.h
@@ -5,6 +5,8 @@
#ifndef COMPONENTS_DISPLAY_COMPOSITOR_GPU_DISPLAY_COMPOSITOR_FRAME_SINK_H_
#define COMPONENTS_DISPLAY_COMPOSITOR_GPU_DISPLAY_COMPOSITOR_FRAME_SINK_H_
+#include "cc/surfaces/display.h"
+#include "cc/surfaces/display_client.h"
#include "components/display_compositor/gpu_compositor_frame_sink.h"
#include "components/display_compositor/gpu_compositor_frame_sink_delegate.h"
#include "mojo/public/cpp/bindings/associated_binding.h"
@@ -13,7 +15,8 @@ namespace display_compositor {
class DISPLAY_COMPOSITOR_EXPORT GpuDisplayCompositorFrameSink
: public GpuCompositorFrameSink,
- public NON_EXPORTED_BASE(cc::mojom::DisplayPrivate) {
+ public NON_EXPORTED_BASE(cc::mojom::DisplayPrivate),
+ public NON_EXPORTED_BASE(cc::DisplayClient) {
public:
GpuDisplayCompositorFrameSink(
GpuCompositorFrameSinkDelegate* delegate,
@@ -33,11 +36,26 @@ class DISPLAY_COMPOSITOR_EXPORT GpuDisplayCompositorFrameSink
void ResizeDisplay(const gfx::Size& size) override;
void SetDisplayColorSpace(const gfx::ColorSpace& color_space) override;
void SetOutputIsSecure(bool secure) override;
+ void SetLocalSurfaceId(const cc::LocalSurfaceId& local_surface_id,
+ float scale_factor) override;
private:
+ // cc::DisplayClient:
+ void DisplayOutputSurfaceLost() override;
+ void DisplayWillDrawAndSwap(bool will_draw_and_swap,
+ const cc::RenderPassList& render_passes) override;
+ void DisplayDidDrawAndSwap() override;
+
mojo::AssociatedBinding<cc::mojom::MojoCompositorFrameSink> binding_;
mojo::AssociatedBinding<cc::mojom::DisplayPrivate> display_private_binding_;
+ // GpuDisplayCompositorFrameSink holds a Display and its BeginFrameSource if
+ // it created with non-null gpu::SurfaceHandle. In the window server, the
+ // display root window's CompositorFrameSink will have a valid
+ // gpu::SurfaceHandle.
+ std::unique_ptr<cc::BeginFrameSource> display_begin_frame_source_;
+ std::unique_ptr<cc::Display> display_;
+
DISALLOW_COPY_AND_ASSIGN(GpuDisplayCompositorFrameSink);
};

Powered by Google App Engine
This is Rietveld 408576698