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

Unified Diff: cc/surfaces/compositor_frame_sink_support.h

Issue 2696743002: Prepare CompositorFrameSinkSupport To Be Used By DirectCompositorFrameSink (Closed)
Patch Set: Rename submits_to_display_compositor_ to is_root_ 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
« no previous file with comments | « android_webview/browser/surfaces_instance.cc ('k') | cc/surfaces/compositor_frame_sink_support.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.h
diff --git a/cc/surfaces/compositor_frame_sink_support.h b/cc/surfaces/compositor_frame_sink_support.h
index 2779a1213dee3b6b24be4cfc6f627e7bf3a1b980..7e10800b868239033f302630be47d769b671c3f7 100644
--- a/cc/surfaces/compositor_frame_sink_support.h
+++ b/cc/surfaces/compositor_frame_sink_support.h
@@ -30,7 +30,9 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
CompositorFrameSinkSupport(CompositorFrameSinkSupportClient* client,
SurfaceManager* surface_manager,
const FrameSinkId& frame_sink_id,
- bool submits_to_display_compositor);
+ bool is_root,
+ bool handles_frame_sink_id_invalidation,
+ bool needs_sync_points);
~CompositorFrameSinkSupport() override;
@@ -115,7 +117,19 @@ class CC_SURFACES_EXPORT CompositorFrameSinkSupport
// The set of BeginFrame children of this CompositorFrameSink.
std::unordered_set<FrameSinkId, FrameSinkIdHash> child_frame_sinks_;
- const bool submits_to_display_compositor_;
+ const bool is_root_;
+
+ // TODO(staraz): Remove this flag once ui::Compositor no longer needs to call
+ // RegisterFrameSinkId().
+ // A surfaceSequence's validity is bound to the lifetime of the parent
+ // FrameSink that created it. We track the lifetime of FrameSinks through
+ // RegisterFrameSinkId and InvalidateFrameSinkId. During startup and GPU
+ // restart, a SurfaceSequence created by the top most layer compositor may be
+ // used prior to the creation of the associated CompositorFrameSinkSupport.
+ // CompositorFrameSinkSupport is created asynchronously when a new GPU channel
+ // is established. Once we switch to SurfaceReferences, this ordering concern
+ // goes away and we can remove this bool.
+ const bool handles_frame_sink_id_invalidation_;
base::WeakPtrFactory<CompositorFrameSinkSupport> weak_factory_;
« no previous file with comments | « android_webview/browser/surfaces_instance.cc ('k') | cc/surfaces/compositor_frame_sink_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698