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

Unified Diff: cc/test/test_delegating_output_surface.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
« no previous file with comments | « cc/surfaces/surfaces_pixeltest.cc ('k') | cc/trees/layer_tree_host.h » ('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 1865762e7a245b6c216469dc7e4d4549f16a5b85..06d3196c28c113da3ec00967263a4b4cd6f6c5b0 100644
--- a/cc/test/test_delegating_output_surface.cc
+++ b/cc/test/test_delegating_output_surface.cc
@@ -25,7 +25,9 @@ TestDelegatingOutputSurface::TestDelegatingOutputSurface(
nullptr),
surface_manager_(new SurfaceManager),
surface_id_allocator_(new SurfaceIdAllocator(kCompositorClientId)),
- surface_factory_(new SurfaceFactory(surface_manager_.get(), this)),
+ surface_factory_(new SurfaceFactory(kCompositorClientId,
+ surface_manager_.get(),
+ this)),
display_(std::move(display)),
weak_ptrs_(this) {
CHECK(display_);
@@ -33,8 +35,6 @@ TestDelegatingOutputSurface::TestDelegatingOutputSurface(
capabilities_.can_force_reclaim_resources = allow_force_reclaim_resources;
capabilities_.delegated_sync_points_required =
!context_shared_with_compositor;
-
- surface_id_allocator_->RegisterSurfaceClientId(surface_manager_.get());
}
TestDelegatingOutputSurface::~TestDelegatingOutputSurface() {}
@@ -50,8 +50,6 @@ bool TestDelegatingOutputSurface::BindToClient(OutputSurfaceClient* client) {
if (!capabilities_.delegated_sync_points_required && context_provider())
context_provider()->SetLostContextCallback(base::Closure());
- surface_manager_->RegisterSurfaceFactoryClient(
- surface_id_allocator_->client_id(), this);
display_->Initialize(&display_client_, surface_manager_.get(),
surface_id_allocator_->client_id());
return true;
@@ -60,8 +58,6 @@ bool TestDelegatingOutputSurface::BindToClient(OutputSurfaceClient* client) {
void TestDelegatingOutputSurface::DetachFromClient() {
if (!delegated_surface_id_.is_null())
surface_factory_->Destroy(delegated_surface_id_);
- surface_manager_->UnregisterSurfaceFactoryClient(
- surface_id_allocator_->client_id());
display_ = nullptr;
surface_factory_ = nullptr;
« no previous file with comments | « cc/surfaces/surfaces_pixeltest.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698