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

Unified Diff: services/ui/surfaces/display_compositor.cc

Issue 2144733005: [WIP] cc: Plumb SurfaceId from clients Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ensure only SurfaceFactoy and tests can update hierarchy Created 4 years, 5 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: services/ui/surfaces/display_compositor.cc
diff --git a/services/ui/surfaces/display_compositor.cc b/services/ui/surfaces/display_compositor.cc
index 6eee7c95270a6aef086bcf04e5545a138c344315..c64234b208167fb7bcc3153e46cc50c0e434ec5b 100644
--- a/services/ui/surfaces/display_compositor.cc
+++ b/services/ui/surfaces/display_compositor.cc
@@ -29,12 +29,10 @@ DisplayCompositor::DisplayCompositor(
const scoped_refptr<SurfacesState>& surfaces_state)
: task_runner_(task_runner),
surfaces_state_(surfaces_state),
- factory_(surfaces_state->manager(), this),
- allocator_(surfaces_state->next_client_id()) {
- allocator_.RegisterSurfaceClientId(surfaces_state_->manager());
- surfaces_state_->manager()->RegisterSurfaceFactoryClient(
- allocator_.client_id(), this);
-
+ factory_(surfaces_state->next_client_id(),
+ surfaces_state->manager(),
+ this),
+ allocator_(factory_.client_id()) {
scoped_refptr<SurfacesContextProvider> surfaces_context_provider(
new SurfacesContextProvider(widget, gpu_state));
// TODO(rjkroege): If there is something better to do than CHECK, add it.
@@ -76,8 +74,6 @@ DisplayCompositor::DisplayCompositor(
}
DisplayCompositor::~DisplayCompositor() {
- surfaces_state_->manager()->UnregisterSurfaceFactoryClient(
- allocator_.client_id());
}
void DisplayCompositor::SubmitCompositorFrame(
« no previous file with comments | « services/ui/gpu/display_compositor/compositor_frame_sink_impl.cc ('k') | services/ui/ws/server_window_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698