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

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

Issue 367163003: Disallow squashing for layers with reflections (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use blue.png instead of ducky.png Created 6 years, 5 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/CompositingLayerAssigner.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 25 matching lines...) Expand all
36 const uint64_t CompositingReasonNegativeZIndexChildren = UINT6 4_C(1) << 17; 36 const uint64_t CompositingReasonNegativeZIndexChildren = UINT6 4_C(1) << 17;
37 const uint64_t CompositingReasonScrollsWithRespectToSquashingLayer = UINT6 4_C(1) << 18; 37 const uint64_t CompositingReasonScrollsWithRespectToSquashingLayer = UINT6 4_C(1) << 18;
38 const uint64_t CompositingReasonSquashingSparsityExceeded = UINT6 4_C(1) << 19; 38 const uint64_t CompositingReasonSquashingSparsityExceeded = UINT6 4_C(1) << 19;
39 const uint64_t CompositingReasonSquashingClippingContainerMismatch = UINT6 4_C(1) << 20; 39 const uint64_t CompositingReasonSquashingClippingContainerMismatch = UINT6 4_C(1) << 20;
40 const uint64_t CompositingReasonSquashingOpacityAncestorMismatch = UINT6 4_C(1) << 21; 40 const uint64_t CompositingReasonSquashingOpacityAncestorMismatch = UINT6 4_C(1) << 21;
41 const uint64_t CompositingReasonSquashingTransformAncestorMismatch = UINT6 4_C(1) << 22; 41 const uint64_t CompositingReasonSquashingTransformAncestorMismatch = UINT6 4_C(1) << 22;
42 const uint64_t CompositingReasonSquashingFilterAncestorMismatch = UINT6 4_C(1) << 23; 42 const uint64_t CompositingReasonSquashingFilterAncestorMismatch = UINT6 4_C(1) << 23;
43 const uint64_t CompositingReasonSquashingWouldBreakPaintOrder = UINT6 4_C(1) << 24; 43 const uint64_t CompositingReasonSquashingWouldBreakPaintOrder = UINT6 4_C(1) << 24;
44 const uint64_t CompositingReasonSquashingVideoIsDisallowed = UINT6 4_C(1) << 25; 44 const uint64_t CompositingReasonSquashingVideoIsDisallowed = UINT6 4_C(1) << 25;
45 const uint64_t CompositingReasonSquashedLayerClipsCompositingDescendants = UINT6 4_C(1) << 26; 45 const uint64_t CompositingReasonSquashedLayerClipsCompositingDescendants = UINT6 4_C(1) << 26;
46 const uint64_t CompositedReasonSquashingRenderPart = UINT6 4_C(1) << 27; 46 const uint64_t CompositingReasonSquashingRenderPartIsDisallowed = UINT6 4_C(1) << 27;
47 const uint64_t CompositingReasonSquashingReflectionIsDisallowed = UINT6 4_C(1) << 28;
47 48
48 // Subtree reasons that require knowing what the status of your subtree is befor e knowing the answer 49 // Subtree reasons that require knowing what the status of your subtree is befor e knowing the answer
49 const uint64_t CompositingReasonTransformWithCompositedDescendants = UINT6 4_C(1) << 28; 50 const uint64_t CompositingReasonTransformWithCompositedDescendants = UINT6 4_C(1) << 29;
50 const uint64_t CompositingReasonOpacityWithCompositedDescendants = UINT6 4_C(1) << 29; 51 const uint64_t CompositingReasonOpacityWithCompositedDescendants = UINT6 4_C(1) << 30;
51 const uint64_t CompositingReasonMaskWithCompositedDescendants = UINT6 4_C(1) << 30; 52 const uint64_t CompositingReasonMaskWithCompositedDescendants = UINT6 4_C(1) << 31;
52 const uint64_t CompositingReasonReflectionWithCompositedDescendants = UINT6 4_C(1) << 31; 53 const uint64_t CompositingReasonReflectionWithCompositedDescendants = UINT6 4_C(1) << 32;
53 const uint64_t CompositingReasonFilterWithCompositedDescendants = UINT6 4_C(1) << 32; 54 const uint64_t CompositingReasonFilterWithCompositedDescendants = UINT6 4_C(1) << 33;
54 const uint64_t CompositingReasonBlendingWithCompositedDescendants = UINT6 4_C(1) << 33; 55 const uint64_t CompositingReasonBlendingWithCompositedDescendants = UINT6 4_C(1) << 34;
55 const uint64_t CompositingReasonClipsCompositingDescendants = UINT6 4_C(1) << 34; 56 const uint64_t CompositingReasonClipsCompositingDescendants = UINT6 4_C(1) << 35;
56 const uint64_t CompositingReasonPerspectiveWith3DDescendants = UINT6 4_C(1) << 35; 57 const uint64_t CompositingReasonPerspectiveWith3DDescendants = UINT6 4_C(1) << 36;
57 const uint64_t CompositingReasonPreserve3DWith3DDescendants = UINT6 4_C(1) << 36; 58 const uint64_t CompositingReasonPreserve3DWith3DDescendants = UINT6 4_C(1) << 37;
58 const uint64_t CompositingReasonReflectionOfCompositedParent = UINT6 4_C(1) << 37; 59 const uint64_t CompositingReasonReflectionOfCompositedParent = UINT6 4_C(1) << 38;
59 const uint64_t CompositingReasonIsolateCompositedDescendants = UINT6 4_C(1) << 38; 60 const uint64_t CompositingReasonIsolateCompositedDescendants = UINT6 4_C(1) << 39;
60 61
61 // The root layer is a special case that may be forced to be a layer, but also i t needs to be 62 // The root layer is a special case that may be forced to be a layer, but also i t needs to be
62 // a layer if anything else in the subtree is composited. 63 // a layer if anything else in the subtree is composited.
63 const uint64_t CompositingReasonRoot = UINT6 4_C(1) << 39; 64 const uint64_t CompositingReasonRoot = UINT6 4_C(1) << 40;
64 65
65 // CompositedLayerMapping internal hierarchy reasons 66 // CompositedLayerMapping internal hierarchy reasons
66 const uint64_t CompositingReasonLayerForAncestorClip = UINT6 4_C(1) << 40; 67 const uint64_t CompositingReasonLayerForAncestorClip = UINT6 4_C(1) << 41;
67 const uint64_t CompositingReasonLayerForDescendantClip = UINT6 4_C(1) << 41; 68 const uint64_t CompositingReasonLayerForDescendantClip = UINT6 4_C(1) << 42;
68 const uint64_t CompositingReasonLayerForPerspective = UINT6 4_C(1) << 42; 69 const uint64_t CompositingReasonLayerForPerspective = UINT6 4_C(1) << 43;
69 const uint64_t CompositingReasonLayerForHorizontalScrollbar = UINT6 4_C(1) << 43; 70 const uint64_t CompositingReasonLayerForHorizontalScrollbar = UINT6 4_C(1) << 44;
70 const uint64_t CompositingReasonLayerForVerticalScrollbar = UINT6 4_C(1) << 44; 71 const uint64_t CompositingReasonLayerForVerticalScrollbar = UINT6 4_C(1) << 45;
71 const uint64_t CompositingReasonLayerForScrollCorner = UINT6 4_C(1) << 45; 72 const uint64_t CompositingReasonLayerForScrollCorner = UINT6 4_C(1) << 46;
72 const uint64_t CompositingReasonLayerForScrollingContents = UINT6 4_C(1) << 46; 73 const uint64_t CompositingReasonLayerForScrollingContents = UINT6 4_C(1) << 47;
73 const uint64_t CompositingReasonLayerForScrollingContainer = UINT6 4_C(1) << 47; 74 const uint64_t CompositingReasonLayerForScrollingContainer = UINT6 4_C(1) << 48;
74 const uint64_t CompositingReasonLayerForSquashingContents = UINT6 4_C(1) << 48; 75 const uint64_t CompositingReasonLayerForSquashingContents = UINT6 4_C(1) << 49;
75 const uint64_t CompositingReasonLayerForSquashingContainer = UINT6 4_C(1) << 49; 76 const uint64_t CompositingReasonLayerForSquashingContainer = UINT6 4_C(1) << 50;
76 const uint64_t CompositingReasonLayerForForeground = UINT6 4_C(1) << 50; 77 const uint64_t CompositingReasonLayerForForeground = UINT6 4_C(1) << 51;
77 const uint64_t CompositingReasonLayerForBackground = UINT6 4_C(1) << 51; 78 const uint64_t CompositingReasonLayerForBackground = UINT6 4_C(1) << 52;
78 const uint64_t CompositingReasonLayerForMask = UINT6 4_C(1) << 52; 79 const uint64_t CompositingReasonLayerForMask = UINT6 4_C(1) << 53;
79 const uint64_t CompositingReasonLayerForClippingMask = UINT6 4_C(1) << 53; 80 const uint64_t CompositingReasonLayerForClippingMask = UINT6 4_C(1) << 54;
80 const uint64_t CompositingReasonLayerForScrollingBlockSelection = UINT6 4_C(1) << 54; 81 const uint64_t CompositingReasonLayerForScrollingBlockSelection = UINT6 4_C(1) << 55;
81 82
82 // Various combinations of compositing reasons are defined here also, for more i ntutive and faster bitwise logic. 83 // Various combinations of compositing reasons are defined here also, for more i ntutive and faster bitwise logic.
83 const uint64_t CompositingReasonComboAllDirectReasons = 84 const uint64_t CompositingReasonComboAllDirectReasons =
84 CompositingReason3DTransform 85 CompositingReason3DTransform
85 | CompositingReasonVideo 86 | CompositingReasonVideo
86 | CompositingReasonCanvas 87 | CompositingReasonCanvas
87 | CompositingReasonPlugin 88 | CompositingReasonPlugin
88 | CompositingReasonIFrame 89 | CompositingReasonIFrame
89 | CompositingReasonBackfaceVisibilityHidden 90 | CompositingReasonBackfaceVisibilityHidden
90 | CompositingReasonActiveAnimation 91 | CompositingReasonActiveAnimation
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 | CompositingReasonNegativeZIndexChildren 132 | CompositingReasonNegativeZIndexChildren
132 | CompositingReasonScrollsWithRespectToSquashingLayer 133 | CompositingReasonScrollsWithRespectToSquashingLayer
133 | CompositingReasonSquashingSparsityExceeded 134 | CompositingReasonSquashingSparsityExceeded
134 | CompositingReasonSquashingClippingContainerMismatch 135 | CompositingReasonSquashingClippingContainerMismatch
135 | CompositingReasonSquashingOpacityAncestorMismatch 136 | CompositingReasonSquashingOpacityAncestorMismatch
136 | CompositingReasonSquashingTransformAncestorMismatch 137 | CompositingReasonSquashingTransformAncestorMismatch
137 | CompositingReasonSquashingFilterAncestorMismatch 138 | CompositingReasonSquashingFilterAncestorMismatch
138 | CompositingReasonSquashingWouldBreakPaintOrder 139 | CompositingReasonSquashingWouldBreakPaintOrder
139 | CompositingReasonSquashingVideoIsDisallowed 140 | CompositingReasonSquashingVideoIsDisallowed
140 | CompositingReasonSquashedLayerClipsCompositingDescendants 141 | CompositingReasonSquashedLayerClipsCompositingDescendants
141 | CompositedReasonSquashingRenderPart 142 | CompositingReasonSquashingRenderPartIsDisallowed
143 | CompositingReasonSquashingReflectionIsDisallowed
142 | CompositingReasonTransformWithCompositedDescendants 144 | CompositingReasonTransformWithCompositedDescendants
143 | CompositingReasonOpacityWithCompositedDescendants 145 | CompositingReasonOpacityWithCompositedDescendants
144 | CompositingReasonMaskWithCompositedDescendants 146 | CompositingReasonMaskWithCompositedDescendants
145 | CompositingReasonFilterWithCompositedDescendants 147 | CompositingReasonFilterWithCompositedDescendants
146 | CompositingReasonBlendingWithCompositedDescendants 148 | CompositingReasonBlendingWithCompositedDescendants
147 | CompositingReasonIsolateCompositedDescendants 149 | CompositingReasonIsolateCompositedDescendants
148 | CompositingReasonPreserve3DWith3DDescendants; // preserve-3d has to create backing store to ensure that 3d-transformed elements intersect. 150 | CompositingReasonPreserve3DWith3DDescendants; // preserve-3d has to create backing store to ensure that 3d-transformed elements intersect.
149 151
150 const uint64_t CompositingReasonComboSquashableReasons = 152 const uint64_t CompositingReasonComboSquashableReasons =
151 CompositingReasonOverlap 153 CompositingReasonOverlap
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 "Has an active accelerated animation or transition" }, 203 "Has an active accelerated animation or transition" },
202 { CompositingReasonTransitionProperty, 204 { CompositingReasonTransitionProperty,
203 "transitionProperty", 205 "transitionProperty",
204 "Has an acceleratable transition property (active or inactive)" }, 206 "Has an acceleratable transition property (active or inactive)" },
205 { CompositingReasonFilters, 207 { CompositingReasonFilters,
206 "filters", 208 "filters",
207 "Has an accelerated filter" }, 209 "Has an accelerated filter" },
208 { CompositingReasonPositionFixed, 210 { CompositingReasonPositionFixed,
209 "positionFixed", 211 "positionFixed",
210 "Is fixed position" }, 212 "Is fixed position" },
211 { 0, 0, 0 }, // Available.
212 { CompositingReasonOverflowScrollingTouch, 213 { CompositingReasonOverflowScrollingTouch,
213 "overflowScrollingTouch", 214 "overflowScrollingTouch",
214 "Is a scrollable overflow element" }, 215 "Is a scrollable overflow element" },
215 { CompositingReasonOverflowScrollingParent, 216 { CompositingReasonOverflowScrollingParent,
216 "overflowScrollingParent", 217 "overflowScrollingParent",
217 "Scroll parent is not an ancestor" }, 218 "Scroll parent is not an ancestor" },
218 { CompositingReasonOutOfFlowClipping, 219 { CompositingReasonOutOfFlowClipping,
219 "outOfFlowClipping", 220 "outOfFlowClipping",
220 "Has clipping ancestor" }, 221 "Has clipping ancestor" },
221 { CompositingReasonVideoOverlay, 222 { CompositingReasonVideoOverlay,
222 "videoOverlay", 223 "videoOverlay",
223 "Is overlay controls for video" }, 224 "Is overlay controls for video" },
224 { CompositingReasonWillChangeCompositingHint, 225 { CompositingReasonWillChangeCompositingHint,
225 "willChange", 226 "willChange",
226 "Has a will-change compositing hint" }, 227 "Has a will-change compositing hint" },
227 { 0, 0, 0 }, // Available.
228 { CompositingReasonAssumedOverlap, 228 { CompositingReasonAssumedOverlap,
229 "assumedOverlap", 229 "assumedOverlap",
230 "Might overlap other composited content" }, 230 "Might overlap other composited content" },
231 { CompositingReasonOverlap, 231 { CompositingReasonOverlap,
232 "overlap", 232 "overlap",
233 "Overlaps other composited content" }, 233 "Overlaps other composited content" },
234 { CompositingReasonNegativeZIndexChildren, 234 { CompositingReasonNegativeZIndexChildren,
235 "negativeZIndexChildren", 235 "negativeZIndexChildren",
236 "Parent with composited negative z-index content" }, 236 "Parent with composited negative z-index content" },
237 { CompositingReasonScrollsWithRespectToSquashingLayer, 237 { CompositingReasonScrollsWithRespectToSquashingLayer,
(...skipping 16 matching lines...) Expand all
254 "Cannot be squashed because this layer has a different filter ancestor t han the squashing layer" }, 254 "Cannot be squashed because this layer has a different filter ancestor t han the squashing layer" },
255 { CompositingReasonSquashingWouldBreakPaintOrder, 255 { CompositingReasonSquashingWouldBreakPaintOrder,
256 "squashingWouldBreakPaintOrder", 256 "squashingWouldBreakPaintOrder",
257 "Cannot be squashed without breaking paint order" }, 257 "Cannot be squashed without breaking paint order" },
258 { CompositingReasonSquashingVideoIsDisallowed, 258 { CompositingReasonSquashingVideoIsDisallowed,
259 "squashingVideoIsDisallowed", 259 "squashingVideoIsDisallowed",
260 "Squashing video is not supported" }, 260 "Squashing video is not supported" },
261 { CompositingReasonSquashedLayerClipsCompositingDescendants, 261 { CompositingReasonSquashedLayerClipsCompositingDescendants,
262 "squashedLayerClipsCompositingDescendants", 262 "squashedLayerClipsCompositingDescendants",
263 "Squashing a layer that clips composited descendants is not supported." }, 263 "Squashing a layer that clips composited descendants is not supported." },
264 { CompositedReasonSquashingRenderPart, 264 { CompositingReasonSquashingRenderPartIsDisallowed,
265 "sompositedReasonSquashingRenderPart", 265 "squashingRenderPartIsDisallowed",
266 "Squashing a frame, iframe or plugin is not supported." }, 266 "Squashing a frame, iframe or plugin is not supported." },
267 { CompositingReasonSquashingReflectionIsDisallowed,
268 "squashingReflectionDisallowed",
269 "Squashing a element with a reflection is not supported." },
267 { CompositingReasonTransformWithCompositedDescendants, 270 { CompositingReasonTransformWithCompositedDescendants,
268 "transformWithCompositedDescendants", 271 "transformWithCompositedDescendants",
269 "Has a transform that needs to be known by compositor because of composi ted descendants" }, 272 "Has a transform that needs to be known by compositor because of composi ted descendants" },
270 { CompositingReasonOpacityWithCompositedDescendants, 273 { CompositingReasonOpacityWithCompositedDescendants,
271 "opacityWithCompositedDescendants", 274 "opacityWithCompositedDescendants",
272 "Has opacity that needs to be applied by compositor because of composite d descendants" }, 275 "Has opacity that needs to be applied by compositor because of composite d descendants" },
273 { CompositingReasonMaskWithCompositedDescendants, 276 { CompositingReasonMaskWithCompositedDescendants,
274 "maskWithCompositedDescendants", 277 "maskWithCompositedDescendants",
275 "Has a mask that needs to be known by compositor because of composited d escendants" }, 278 "Has a mask that needs to be known by compositor because of composited d escendants" },
276 { CompositingReasonReflectionWithCompositedDescendants, 279 { CompositingReasonReflectionWithCompositedDescendants,
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 "layerForClippingMask", 346 "layerForClippingMask",
344 "Secondary layer, for clipping mask" }, 347 "Secondary layer, for clipping mask" },
345 { CompositingReasonLayerForScrollingBlockSelection, 348 { CompositingReasonLayerForScrollingBlockSelection,
346 "layerForScrollingBlockSelection", 349 "layerForScrollingBlockSelection",
347 "Secondary layer, to house block selection gaps for composited scrolling with no scrolling contents" }, 350 "Secondary layer, to house block selection gaps for composited scrolling with no scrolling contents" },
348 }; 351 };
349 352
350 } // namespace WebCore 353 } // namespace WebCore
351 354
352 #endif // CompositingReasons_h 355 #endif // CompositingReasons_h
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/CompositingLayerAssigner.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698