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

Unified Diff: content/browser/renderer_host/delegated_frame_host.cc

Issue 2175293003: cc: Register namespace hierarchy after ui::Compositor's SurfaceFactory available (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit test and addressed comments 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
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/delegated_frame_host.cc
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc
index 626ce81bcac47d65e6bd052bb8883988c0ac6733..67af34c585787455d37844368882e0a984c62c62 100644
--- a/content/browser/renderer_host/delegated_frame_host.cc
+++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -837,10 +837,7 @@ void DelegatedFrameHost::SetCompositor(ui::Compositor* compositor) {
vsync_manager_ = compositor_->vsync_manager();
vsync_manager_->AddObserver(this);
- ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
- uint32_t parent = compositor->surface_id_allocator()->client_id();
- factory->GetSurfaceManager()->RegisterSurfaceNamespaceHierarchy(
- parent, id_allocator_->client_id());
+ compositor_->AddSurfaceClient(id_allocator_->client_id());
}
void DelegatedFrameHost::ResetCompositor() {
@@ -857,11 +854,7 @@ void DelegatedFrameHost::ResetCompositor() {
vsync_manager_ = NULL;
}
- ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
- uint32_t parent = compositor_->surface_id_allocator()->client_id();
- factory->GetSurfaceManager()->UnregisterSurfaceNamespaceHierarchy(
- parent, id_allocator_->client_id());
-
+ compositor_->RemoveSurfaceClient(id_allocator_->client_id());
compositor_ = nullptr;
}
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698