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

Unified Diff: cc/surfaces/compositor_frame_sink_support.h

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
Index: cc/surfaces/compositor_frame_sink_support.h
diff --git a/cc/surfaces/compositor_frame_sink_support.h b/cc/surfaces/compositor_frame_sink_support.h
index bdafb4933e6c0f752edc1fde38a9d63fd003d6b5..049378a4e08194911103ba870fca6c1aa121fb14 100644
--- a/cc/surfaces/compositor_frame_sink_support.h
+++ b/cc/surfaces/compositor_frame_sink_support.h
@@ -56,6 +56,13 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
void ForceReclaimResources();
void ClaimTemporaryReference(const SurfaceId& surface_id);
+ BeginFrameSource* BeginFrameSourceForTesting() const;
+ const ReturnedResourceArray& LastReturnedResourcesForTesting() const;
+ const gfx::Rect& last_damage_rect() { return last_damage_rect_; }
+ const LocalSurfaceId& last_local_surface_id() {
+ return last_local_surface_id_;
+ }
+
private:
// Update surface references with SurfaceManager for current CompositorFrame
// that has |local_surface_id|. UpdateReferences() must be called on
@@ -97,6 +104,7 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
// yet received an ACK.
int ack_pending_count_ = 0;
ReturnedResourceArray surface_returned_resources_;
+ ReturnedResourceArray last_returned_resources_;
// The begin frame source being observered. Null if none.
BeginFrameSource* begin_frame_source_ = nullptr;
@@ -115,6 +123,8 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
ReferencedSurfaceTracker reference_tracker_;
const bool is_root_;
+ gfx::Rect last_damage_rect_;
+ LocalSurfaceId last_local_surface_id_;
// TODO(staraz): Remove this flag once ui::Compositor no longer needs to call
// RegisterFrameSinkId().
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support.cc » ('j') | cc/surfaces/compositor_frame_sink_support.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698