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

Unified Diff: cc/surfaces/compositor_frame_sink_support.cc

Issue 2824053003: Split SurfaceFactoryClient Into Four Interfaces (Closed)
Patch Set: Address Nits Created 3 years, 8 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 | « cc/surfaces/compositor_frame_sink_support.h ('k') | cc/surfaces/framesink_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/compositor_frame_sink_support.cc
diff --git a/cc/surfaces/compositor_frame_sink_support.cc b/cc/surfaces/compositor_frame_sink_support.cc
index 1db8d8f75d186673276c0ce6564ac4e8c69a7196..7fc9e6556d46ce13067d902aa23a44019747c27e 100644
--- a/cc/surfaces/compositor_frame_sink_support.cc
+++ b/cc/surfaces/compositor_frame_sink_support.cc
@@ -47,7 +47,7 @@ CompositorFrameSinkSupport::~CompositorFrameSinkSupport() {
// call back into here and access |client_| so we should destroy
// |surface_factory_|'s resources early on.
surface_factory_->EvictSurface();
- surface_manager_->UnregisterSurfaceFactoryClient(frame_sink_id_);
+ surface_manager_->UnregisterFrameSinkManagerClient(frame_sink_id_);
if (handles_frame_sink_id_invalidation_)
surface_manager_->InvalidateFrameSinkId(frame_sink_id_);
}
@@ -93,13 +93,6 @@ void CompositorFrameSinkSupport::SetBeginFrameSource(
UpdateNeedsBeginFramesInternal();
}
-void CompositorFrameSinkSupport::WillDrawSurface(
- const LocalSurfaceId& local_surface_id,
- const gfx::Rect& damage_rect) {
- if (client_)
- client_->WillDrawSurface(local_surface_id, damage_rect);
-}
-
void CompositorFrameSinkSupport::EvictFrame() {
DCHECK(surface_factory_);
surface_factory_->EvictSurface();
@@ -213,6 +206,13 @@ void CompositorFrameSinkSupport::DidReceiveCompositorFrameAck() {
surface_returned_resources_.clear();
}
+void CompositorFrameSinkSupport::WillDrawSurface(
+ const LocalSurfaceId& local_surface_id,
+ const gfx::Rect& damage_rect) {
+ if (client_)
+ client_->WillDrawSurface(local_surface_id, damage_rect);
+}
+
void CompositorFrameSinkSupport::ForceReclaimResources() {
DCHECK(surface_factory_);
surface_factory_->ClearSurface();
@@ -238,11 +238,11 @@ CompositorFrameSinkSupport::CompositorFrameSinkSupport(
void CompositorFrameSinkSupport::Init(SurfaceManager* surface_manager,
bool needs_sync_points) {
surface_manager_ = surface_manager;
- surface_factory_ =
- base::MakeUnique<SurfaceFactory>(frame_sink_id_, surface_manager_, this);
+ surface_factory_ = base::MakeUnique<SurfaceFactory>(
+ frame_sink_id_, surface_manager_, this, this);
if (handles_frame_sink_id_invalidation_)
surface_manager_->RegisterFrameSinkId(frame_sink_id_);
- surface_manager_->RegisterSurfaceFactoryClient(frame_sink_id_, this);
+ surface_manager_->RegisterFrameSinkManagerClient(frame_sink_id_, this);
surface_factory_->set_needs_sync_points(needs_sync_points);
}
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support.h ('k') | cc/surfaces/framesink_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698