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

Unified Diff: cc/surfaces/surface_id_allocator.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.h ('k') | cc/test/test_delegating_output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/surfaces/surface_id_allocator.cc
diff --git a/cc/surfaces/surface_id_allocator.cc b/cc/surfaces/surface_id_allocator.cc
index 9151400f3ce2107b81ac8a99256e70c043d5a3eb..7ed7f521703b7aa5323125a4d19adc46ea38a408 100644
--- a/cc/surfaces/surface_id_allocator.cc
+++ b/cc/surfaces/surface_id_allocator.cc
@@ -12,17 +12,9 @@
namespace cc {
SurfaceIdAllocator::SurfaceIdAllocator(uint32_t client_id)
- : client_id_(client_id), next_id_(1u), manager_(nullptr) {}
-
-void SurfaceIdAllocator::RegisterSurfaceClientId(SurfaceManager* manager) {
- DCHECK(!manager_);
- manager_ = manager;
- manager_->RegisterSurfaceClientId(client_id_);
-}
+ : client_id_(client_id), next_id_(1u) {}
SurfaceIdAllocator::~SurfaceIdAllocator() {
- if (manager_)
- manager_->InvalidateSurfaceClientId(client_id_);
}
SurfaceId SurfaceIdAllocator::GenerateId() {
« no previous file with comments | « cc/surfaces/surface_id_allocator.h ('k') | cc/test/test_delegating_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698