| 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 df3954953bf83844c7cc5b04bddbb4f5a60de2a8..bf33e3a6aa662f0f2b57fc934faa7dd817beeaab 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/CompositorElementId.h
|
| +++ b/third_party/WebKit/Source/platform/graphics/CompositorElementId.h
|
| @@ -13,20 +13,29 @@
|
|
|
| namespace blink {
|
|
|
| -enum class CompositorSubElementId {
|
| +const int kCompositorNamespaceBitCount = 3;
|
| +
|
| +enum class CompositorElementIdNamespace {
|
| kPrimary,
|
| kScroll,
|
| kViewport,
|
| kLinkHighlight,
|
| - // A sentinel to indicate how many enum values there are.
|
| - kNumSubElementTypes
|
| + 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 ScrollbarId = uint64_t;
|
| +
|
| +CompositorElementId PLATFORM_EXPORT
|
| + CompositorElementIdFromDOMNodeId(DOMNodeId, CompositorElementIdNamespace);
|
|
|
| CompositorElementId PLATFORM_EXPORT
|
| - CreateCompositorElementId(DOMNodeId, CompositorSubElementId);
|
| + CompositorElementIdFromScrollbarId(ScrollbarId,
|
| + CompositorElementIdNamespace);
|
|
|
| // Note cc::ElementId has a hash function already implemented via
|
| // ElementIdHash::operator(). However for consistency's sake we choose to use
|
| @@ -42,9 +51,9 @@ struct CompositorElementIdHash {
|
| static const bool safe_to_compare_to_empty_or_deleted = true;
|
| };
|
|
|
| -DOMNodeId PLATFORM_EXPORT DomNodeIdFromCompositorElementId(CompositorElementId);
|
| -CompositorSubElementId PLATFORM_EXPORT
|
| - SubElementIdFromCompositorElementId(CompositorElementId);
|
| +uint64_t PLATFORM_EXPORT IdFromCompositorElementId(CompositorElementId);
|
| +CompositorElementIdNamespace PLATFORM_EXPORT
|
| + NamespaceFromCompositorElementId(CompositorElementId);
|
|
|
| struct CompositorElementIdHashTraits
|
| : WTF::GenericHashTraits<CompositorElementId> {
|
|
|