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

Unified Diff: cc/surfaces/surface_id_allocator.cc

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. Created 3 years, 11 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_id_allocator.cc
diff --git a/cc/surfaces/surface_id_allocator.cc b/cc/surfaces/surface_id_allocator.cc
index 24bcfbd46f95e9e95a7af99b6c8769ab8dbb38cd..e50eafb3b6590aa72eb740216d8a95b08d2e90fa 100644
--- a/cc/surfaces/surface_id_allocator.cc
+++ b/cc/surfaces/surface_id_allocator.cc
@@ -16,10 +16,11 @@ SurfaceIdAllocator::SurfaceIdAllocator() : next_id_(1u) {}
SurfaceIdAllocator::~SurfaceIdAllocator() {
}
-LocalFrameId SurfaceIdAllocator::GenerateId() {
- LocalFrameId id(next_id_, base::UnguessableToken::Create());
+const LocalFrameId& SurfaceIdAllocator::GenerateId() {
+ current_local_frame_id_ =
+ LocalFrameId(next_id_, base::UnguessableToken::Create());
next_id_++;
- return id;
+ return current_local_frame_id_;
}
} // namespace cc

Powered by Google App Engine
This is Rietveld 408576698