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

Side by Side Diff: Source/platform/graphics/CompositingReasons.h

Issue 215063006: Separate the geometry update from rebuilding the GraphicsLayer tree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CompositingReasons_h 5 #ifndef CompositingReasons_h
6 #define CompositingReasons_h 6 #define CompositingReasons_h
7 7
8 #include "wtf/MathExtras.h" 8 #include "wtf/MathExtras.h"
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 | CompositingReasonIsolateCompositedDescendants 110 | CompositingReasonIsolateCompositedDescendants
111 | CompositingReasonPreserve3DWith3DDescendants; // preserve-3d has to create backing store to ensure that 3d-transformed elements intersect. 111 | CompositingReasonPreserve3DWith3DDescendants; // preserve-3d has to create backing store to ensure that 3d-transformed elements intersect.
112 112
113 const uint64_t CompositingReasonComboSquashableReasons = 113 const uint64_t CompositingReasonComboSquashableReasons =
114 CompositingReasonOverlap 114 CompositingReasonOverlap
115 | CompositingReasonAssumedOverlap 115 | CompositingReasonAssumedOverlap
116 | CompositingReasonOverflowScrollingParent; 116 | CompositingReasonOverflowScrollingParent;
117 117
118 typedef uint64_t CompositingReasons; 118 typedef uint64_t CompositingReasons;
119 119
120 // Any reasons other than overlap or assumed overlap will require the layer to b e separately compositing.
121 inline bool requiresCompositing(CompositingReasons reasons)
122 {
123 return reasons & ~CompositingReasonComboSquashableReasons;
124 }
125
126 // If the layer has overlap or assumed overlap, but no other reasons, then it sh ould be squashed.
127 inline bool requiresSquashing(CompositingReasons reasons)
128 {
129 return !requiresCompositing(reasons) && (reasons & CompositingReasonComboSqu ashableReasons);
130 }
131
120 struct CompositingReasonStringMap { 132 struct CompositingReasonStringMap {
121 CompositingReasons reason; 133 CompositingReasons reason;
122 const char* shortName; 134 const char* shortName;
123 const char* description; 135 const char* description;
124 }; 136 };
125 137
126 // FIXME: This static data shouldn't be in a header. When it's in the header 138 // FIXME: This static data shouldn't be in a header. When it's in the header
127 // it's copied into every compilation unit that includes the header. 139 // it's copied into every compilation unit that includes the header.
128 static const CompositingReasonStringMap compositingReasonStringMap[] = { 140 static const CompositingReasonStringMap compositingReasonStringMap[] = {
129 { CompositingReasonNone, 141 { CompositingReasonNone,
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 "layerForMask", 277 "layerForMask",
266 "Secondary layer, to contain the mask contents" }, 278 "Secondary layer, to contain the mask contents" },
267 { CompositingReasonLayerForClippingMask, 279 { CompositingReasonLayerForClippingMask,
268 "layerForClippingMask", 280 "layerForClippingMask",
269 "Secondary layer, for clipping mask" } 281 "Secondary layer, for clipping mask" }
270 }; 282 };
271 283
272 } // namespace WebCore 284 } // namespace WebCore
273 285
274 #endif // CompositingReasons_h 286 #endif // CompositingReasons_h
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698