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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/CompositorElementId.cpp

Issue 2881423004: Stop retrieving scrolling element id from the CompositorElementId. (Closed)
Patch Set: Merge branch 'master' into scrollstate 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "platform/graphics/CompositorElementId.h" 5 #include "platform/graphics/CompositorElementId.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 static CompositorElementId CreateCompositorElementId( 9 static CompositorElementId CreateCompositorElementId(
10 uint64_t blink_id, 10 uint64_t blink_id,
(...skipping 15 matching lines...) Expand all
26 CompositorElementIdNamespace namespace_id) { 26 CompositorElementIdNamespace namespace_id) {
27 return CreateCompositorElementId(id, namespace_id); 27 return CreateCompositorElementId(id, namespace_id);
28 } 28 }
29 29
30 CompositorElementId PLATFORM_EXPORT 30 CompositorElementId PLATFORM_EXPORT
31 CompositorElementIdFromScrollbarId(ScrollbarId id, 31 CompositorElementIdFromScrollbarId(ScrollbarId id,
32 CompositorElementIdNamespace namespace_id) { 32 CompositorElementIdNamespace namespace_id) {
33 return CreateCompositorElementId(id, namespace_id); 33 return CreateCompositorElementId(id, namespace_id);
34 } 34 }
35 35
36 uint64_t IdFromCompositorElementId(CompositorElementId element_id) {
37 return element_id.id_ >> kCompositorNamespaceBitCount;
38 }
39
40 CompositorElementIdNamespace NamespaceFromCompositorElementId( 36 CompositorElementIdNamespace NamespaceFromCompositorElementId(
41 CompositorElementId element_id) { 37 CompositorElementId element_id) {
42 return static_cast<CompositorElementIdNamespace>( 38 return static_cast<CompositorElementIdNamespace>(
43 element_id.id_ % 39 element_id.id_ %
44 static_cast<uint64_t>( 40 static_cast<uint64_t>(
45 CompositorElementIdNamespace::kMaxRepresentableNamespaceId)); 41 CompositorElementIdNamespace::kMaxRepresentableNamespaceId));
46 } 42 }
47 43
48 } // namespace blink 44 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698