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

Unified Diff: components/viz/client/client_compositor_frame_sink.h

Issue 2903853002: Make RendererCompositorFrameSink derive from ClientCompositorFrameSink (Closed)
Patch Set: Add comments 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
« no previous file with comments | « no previous file | components/viz/client/client_compositor_frame_sink.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/viz/client/client_compositor_frame_sink.h
diff --git a/components/viz/client/client_compositor_frame_sink.h b/components/viz/client/client_compositor_frame_sink.h
index 407aa4130c4cf8850a37d536a3970c328a63f805..008b730264ab968aed9caee42e69c5f329b49078 100644
--- a/components/viz/client/client_compositor_frame_sink.h
+++ b/components/viz/client/client_compositor_frame_sink.h
@@ -23,7 +23,19 @@ class ClientCompositorFrameSink
public:
ClientCompositorFrameSink(
scoped_refptr<cc::ContextProvider> context_provider,
+ scoped_refptr<cc::ContextProvider> worker_context_provider,
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
+ cc::SharedBitmapManager* shared_bitmap_manager,
+ std::unique_ptr<cc::SyntheticBeginFrameSource>
+ synthetic_begin_frame_source,
+ cc::mojom::MojoCompositorFrameSinkPtrInfo compositor_frame_sink_info,
+ cc::mojom::MojoCompositorFrameSinkClientRequest client_request,
+ bool enable_surface_synchronization);
+
+ ClientCompositorFrameSink(
+ scoped_refptr<cc::VulkanContextProvider> vulkan_context_provider,
+ std::unique_ptr<cc::SyntheticBeginFrameSource>
+ synthetic_begin_frame_source,
cc::mojom::MojoCompositorFrameSinkPtrInfo compositor_frame_sink_info,
cc::mojom::MojoCompositorFrameSinkClientRequest client_request,
bool enable_surface_synchronization);
@@ -38,6 +50,9 @@ class ClientCompositorFrameSink
void DidNotProduceFrame(const cc::BeginFrameAck& ack) override;
private:
+ virtual bool ShouldAllocateNewLocalSurfaceId(
+ const cc::CompositorFrame& frame);
+
// cc::mojom::MojoCompositorFrameSinkClient implementation:
void DidReceiveCompositorFrameAck(
const cc::ReturnedResourceArray& resources) override;
@@ -47,15 +62,17 @@ class ClientCompositorFrameSink
// cc::ExternalBeginFrameSourceClient implementation.
void OnNeedsBeginFrames(bool needs_begin_frames) override;
- gfx::Size last_submitted_frame_size_;
+ gfx::Size surface_size_;
+ float device_scale_factor_ = 0.f;
+
cc::LocalSurfaceId local_surface_id_;
cc::LocalSurfaceIdAllocator id_allocator_;
std::unique_ptr<cc::ExternalBeginFrameSource> begin_frame_source_;
+ std::unique_ptr<cc::SyntheticBeginFrameSource> synthetic_begin_frame_source_;
cc::mojom::MojoCompositorFrameSinkPtrInfo compositor_frame_sink_info_;
cc::mojom::MojoCompositorFrameSinkClientRequest client_request_;
cc::mojom::MojoCompositorFrameSinkPtr compositor_frame_sink_;
- std::unique_ptr<mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient>>
- client_binding_;
+ mojo::Binding<cc::mojom::MojoCompositorFrameSinkClient> client_binding_;
THREAD_CHECKER(thread_checker_);
const bool enable_surface_synchronization_;
« no previous file with comments | « no previous file | components/viz/client/client_compositor_frame_sink.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698