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

Unified Diff: cc/surfaces/compositor_frame_sink_support.cc

Issue 2795683003: [cc]Replace use of SurfaceFactory with CompositorFrameSinkSupport in tests (Closed)
Patch Set: Remove SurfaceFacotry Usages in SurfaceAggregatorTest And Address Comments 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/display_unittest.cc » ('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 b0d7dc28df3399d40605455d89aabe40abf9d80e..1c51ec7a6340b7b87bc4edbddd8b091041ab46d9 100644
--- a/cc/surfaces/compositor_frame_sink_support.cc
+++ b/cc/surfaces/compositor_frame_sink_support.cc
@@ -183,6 +183,15 @@ void CompositorFrameSinkSupport::ClaimTemporaryReference(
surface_manager_->AssignTemporaryReference(surface_id, frame_sink_id_);
}
+BeginFrameSource* CompositorFrameSinkSupport::BeginFrameSourceForTesting()
+ const {
+ return begin_frame_source_;
+}
+const ReturnedResourceArray&
+CompositorFrameSinkSupport::LastReturnedResourcesForTesting() const {
Fady Samuel 2017/04/05 14:42:32 Remove this?
Alex Z. 2017/04/05 20:43:13 Done.
+ return last_returned_resources_;
+}
+
void CompositorFrameSinkSupport::ReferencedSurfacesChanged(
const LocalSurfaceId& local_surface_id,
const std::vector<SurfaceId>* active_referenced_surfaces,
@@ -205,6 +214,7 @@ void CompositorFrameSinkSupport::ReferencedSurfacesChanged(
void CompositorFrameSinkSupport::ReturnResources(
const ReturnedResourceArray& resources) {
+ last_returned_resources_ = resources;
Fady Samuel 2017/04/05 14:42:32 Don't expose this?
Alex Z. 2017/04/05 20:43:13 Done.
if (resources.empty())
return;
@@ -230,6 +240,8 @@ void CompositorFrameSinkSupport::SetBeginFrameSource(
void CompositorFrameSinkSupport::WillDrawSurface(
const LocalSurfaceId& local_surface_id,
const gfx::Rect& damage_rect) {
+ last_local_surface_id_ = local_surface_id;
+ last_damage_rect_ = damage_rect;
Fady Samuel 2017/04/05 14:42:32 Don't expose these. Implement CompositorFrameSinkS
Alex Z. 2017/04/05 20:43:13 Done.
if (client_)
client_->WillDrawSurface(local_surface_id, damage_rect);
}
« no previous file with comments | « cc/surfaces/compositor_frame_sink_support.h ('k') | cc/surfaces/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698