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

Unified Diff: third_party/WebKit/Source/core/dom/CompositorProxy.cpp

Issue 2765053002: Avoid exposing cc::Layer tree to CompositorProxy (Closed)
Patch Set: Rebase onto blink reformat Created 3 years, 8 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: third_party/WebKit/Source/core/dom/CompositorProxy.cpp
diff --git a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
index ad9ccd3379ce1cf62e31996cc32efe450b32e54b..0b0026b1cbe698c65a8f10d15ebec46464fc4bdb 100644
--- a/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
+++ b/third_party/WebKit/Source/core/dom/CompositorProxy.cpp
@@ -19,6 +19,11 @@
#include <algorithm>
namespace blink {
+namespace {
+// An identifier for CompositorProxy objects. Will be unique across all proxies
+// created in the same thread.
+uint64_t g_unique_id = 0;
+} // namespace
static const struct {
const char* name;
@@ -137,7 +142,8 @@ CompositorProxy* CompositorProxy::Create(
CompositorProxy::CompositorProxy(uint64_t element_id,
uint32_t compositor_mutable_properties)
- : element_id_(element_id),
+ : proxy_id_(g_unique_id++),
+ element_id_(element_id),
compositor_mutable_properties_(compositor_mutable_properties),
client_(nullptr) {
DCHECK(compositor_mutable_properties_);

Powered by Google App Engine
This is Rietveld 408576698