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

Unified Diff: ui/compositor/compositor.h

Issue 2383373002: Reduce SurfaceIdAllocator usage and tie SurfaceFactory to a single FrameSinkId (Closed)
Patch Set: Rebased Created 4 years, 2 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 | « ui/android/delegated_frame_host_android.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.h
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 58b8224ab19b7fdbf051e25bee5e3b090d7937f1..e7037d8a72fa494f1155afdfc63a501e641283f5 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -384,9 +384,7 @@ class COMPOSITOR_EXPORT Compositor
return &layer_animator_collection_;
}
- cc::SurfaceIdAllocator* surface_id_allocator() {
- return surface_id_allocator_.get();
- }
+ const cc::FrameSinkId& frame_sink_id() const { return frame_sink_id_; }
private:
friend class base::RefCounted<Compositor>;
@@ -413,10 +411,10 @@ class COMPOSITOR_EXPORT Compositor
ui::Window* window_;
#endif
// A map from child id to parent id.
- std::unordered_map<cc::FrameSinkId, cc::FrameSinkId, cc::FrameSinkIdHash>
- frame_sinks_;
+ std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> child_frame_sinks_;
bool widget_valid_;
bool compositor_frame_sink_requested_;
+ const cc::FrameSinkId frame_sink_id_;
std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
scoped_refptr<cc::Layer> root_web_layer_;
std::unique_ptr<cc::LayerTreeHost> host_;
« no previous file with comments | « ui/android/delegated_frame_host_android.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698