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

Unified Diff: cc/surfaces/surface_manager.cc

Issue 2760433002: SurfaceManager::CreateSurface must set the surface's factory (Closed)
Patch Set: nits Created 3 years, 9 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: cc/surfaces/surface_manager.cc
diff --git a/cc/surfaces/surface_manager.cc b/cc/surfaces/surface_manager.cc
index 753191d7460be547e751b117afe584ad3734c89b..dfa774cee40c95278f9569800bb8d1ee9a36b0b5 100644
--- a/cc/surfaces/surface_manager.cc
+++ b/cc/surfaces/surface_manager.cc
@@ -122,12 +122,13 @@ std::unique_ptr<Surface> SurfaceManager::CreateSurface(
std::unique_ptr<Surface> surface = std::move(*it);
surfaces_to_destroy_.erase(it);
surface->set_destroyed(false);
- DCHECK_EQ(surface_factory.get(), surface->factory().get());
+ surface->set_factory(surface_factory);
return surface;
}
void SurfaceManager::DestroySurface(std::unique_ptr<Surface> surface) {
DCHECK(thread_checker_.CalledOnValidThread());
+
surface->set_destroyed(true);
surfaces_to_destroy_.push_back(std::move(surface));
GarbageCollectSurfaces();
« cc/surfaces/compositor_frame_sink_support_unittest.cc ('K') | « cc/surfaces/surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698