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

Unified Diff: third_party/WebKit/Source/platform/graphics/CompositorElementId.h

Issue 2890953002: [SPv1] Always set a CompositorElementId on main graphics layers; use PaintLayer id. (Closed)
Patch Set: none Created 3 years, 7 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/platform/graphics/CompositorElementId.h
diff --git a/third_party/WebKit/Source/platform/graphics/CompositorElementId.h b/third_party/WebKit/Source/platform/graphics/CompositorElementId.h
index 8ff066b4aba425245c0c67cd22ac20100975777b..6168a6a7927955fb1edfa5e9fc07c22de9e66026 100644
--- a/third_party/WebKit/Source/platform/graphics/CompositorElementId.h
+++ b/third_party/WebKit/Source/platform/graphics/CompositorElementId.h
@@ -17,19 +17,29 @@ const int kCompositorNamespaceBitCount = 3;
enum class CompositorElementIdNamespace {
kPrimary,
+ kRootScroll,
kScroll,
+ kScrollbar,
+ kScrollState,
kViewport,
kLinkHighlight,
- kScrollbar,
// A sentinel to indicate the maximum representable namespace id
// (the maximum is one less than this value).
kMaxRepresentableNamespaceId = 1 << kCompositorNamespaceBitCount
};
using CompositorElementId = cc::ElementId;
-using DOMNodeId = uint64_t;
+using PaintLayerId = uint64_t;
using ScrollbarId = uint64_t;
+using DOMNodeId = uint64_t;
+
+CompositorElementId PLATFORM_EXPORT
+ CompositorElementIdFromPaintLayerId(PaintLayerId,
+ CompositorElementIdNamespace);
+// This method should only be used for "special" layers that are not allocated
+// during the normal lifecycle. Examples include VisualViewport,
+// root scrolling (when rootLayerScrollingEnabled is off), and LinkHighlight.
CompositorElementId PLATFORM_EXPORT
CompositorElementIdFromDOMNodeId(DOMNodeId, CompositorElementIdNamespace);

Powered by Google App Engine
This is Rietveld 408576698