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

Unified Diff: cc/test/test_delegating_output_surface.cc

Issue 2166423002: ui::ContextFactory should not create SurfaceIdAllocators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Dana's nit 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/surfaces/surface_id_allocator.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/test_delegating_output_surface.cc
diff --git a/cc/test/test_delegating_output_surface.cc b/cc/test/test_delegating_output_surface.cc
index 15fca6c14cf857cfc899f5435236b786cec5a60b..64a15fde20b2342dd5d5784f86ef0d09b8a96123 100644
--- a/cc/test/test_delegating_output_surface.cc
+++ b/cc/test/test_delegating_output_surface.cc
@@ -55,8 +55,6 @@ TestDelegatingOutputSurface::TestDelegatingOutputSurface(
capabilities_.can_force_reclaim_resources = true;
capabilities_.delegated_sync_points_required =
!context_shared_with_compositor;
-
- surface_id_allocator_->RegisterSurfaceClientId(surface_manager_.get());
}
TestDelegatingOutputSurface::~TestDelegatingOutputSurface() {}
@@ -72,6 +70,7 @@ bool TestDelegatingOutputSurface::BindToClient(OutputSurfaceClient* client) {
if (!capabilities_.delegated_sync_points_required && context_provider())
context_provider()->SetLostContextCallback(base::Closure());
+ surface_manager_->RegisterSurfaceClientId(surface_id_allocator_->client_id());
surface_manager_->RegisterSurfaceFactoryClient(
surface_id_allocator_->client_id(), this);
display_->Initialize(this, surface_manager_.get(),
@@ -87,6 +86,8 @@ void TestDelegatingOutputSurface::DetachFromClient() {
surface_factory_->Destroy(delegated_surface_id_);
surface_manager_->UnregisterSurfaceFactoryClient(
surface_id_allocator_->client_id());
+ surface_manager_->InvalidateSurfaceClientId(
+ surface_id_allocator_->client_id());
bound_ = false;
}
display_ = nullptr;
« no previous file with comments | « cc/surfaces/surface_id_allocator.cc ('k') | components/exo/surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698