| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "sky/engine/config.h" | |
| 6 #include "sky/engine/platform/graphics/CompositingReasons.h" | |
| 7 | |
| 8 #include "sky/engine/wtf/StdLibExtras.h" | |
| 9 | |
| 10 namespace blink { | |
| 11 | |
| 12 const CompositingReasonStringMap kCompositingReasonStringMap[] = { | |
| 13 { CompositingReasonNone, | |
| 14 "Unknown", | |
| 15 "No reason given" }, | |
| 16 { CompositingReason3DTransform, | |
| 17 "transform3D", | |
| 18 "Has a 3d transform" }, | |
| 19 { CompositingReasonVideo, | |
| 20 "video", | |
| 21 "Is an accelerated video" }, | |
| 22 { CompositingReasonCanvas, | |
| 23 "canvas", | |
| 24 "Is an accelerated canvas" }, | |
| 25 { CompositingReasonIFrame, | |
| 26 "iFrame", | |
| 27 "Is an accelerated iFrame" }, | |
| 28 { CompositingReasonBackfaceVisibilityHidden, | |
| 29 "backfaceVisibilityHidden", | |
| 30 "Has backface-visibility: hidden" }, | |
| 31 { CompositingReasonActiveAnimation, | |
| 32 "activeAnimation", | |
| 33 "Has an active accelerated animation or transition" }, | |
| 34 { CompositingReasonTransitionProperty, | |
| 35 "transitionProperty", | |
| 36 "Has an acceleratable transition property (active or inactive)" }, | |
| 37 { CompositingReasonOverflowScrollingTouch, | |
| 38 "overflowScrollingTouch", | |
| 39 "Is a scrollable overflow element" }, | |
| 40 { CompositingReasonOverflowScrollingParent, | |
| 41 "overflowScrollingParent", | |
| 42 "Scroll parent is not an ancestor" }, | |
| 43 { CompositingReasonOutOfFlowClipping, | |
| 44 "outOfFlowClipping", | |
| 45 "Has clipping ancestor" }, | |
| 46 { CompositingReasonWillChangeCompositingHint, | |
| 47 "willChange", | |
| 48 "Has a will-change compositing hint" }, | |
| 49 { CompositingReasonAssumedOverlap, | |
| 50 "assumedOverlap", | |
| 51 "Might overlap other composited content" }, | |
| 52 { CompositingReasonOverlap, | |
| 53 "overlap", | |
| 54 "Overlaps other composited content" }, | |
| 55 { CompositingReasonNegativeZIndexChildren, | |
| 56 "negativeZIndexChildren", | |
| 57 "Parent with composited negative z-index content" }, | |
| 58 { CompositingReasonScrollsWithRespectToSquashingLayer, | |
| 59 "scrollsWithRespectToSquashingLayer", | |
| 60 "Cannot be squashed since this layer scrolls with respect to the squashi
ng layer" }, | |
| 61 { CompositingReasonSquashingClippingContainerMismatch, | |
| 62 "squashingClippingContainerMismatch", | |
| 63 "Cannot be squashed because this layer has a different clipping containe
r than the squashing layer" }, | |
| 64 { CompositingReasonSquashingOpacityAncestorMismatch, | |
| 65 "squashingOpacityAncestorMismatch", | |
| 66 "Cannot be squashed because this layer has a different opacity ancestor
than the squashing layer" }, | |
| 67 { CompositingReasonSquashingTransformAncestorMismatch, | |
| 68 "squashingTransformAncestorMismatch", | |
| 69 "Cannot be squashed because this layer has a different transform ancesto
r than the squashing layer" }, | |
| 70 { CompositingReasonSquashingFilterAncestorMismatch, | |
| 71 "squashingFilterAncestorMismatch", | |
| 72 "Cannot be squashed because this layer has a different filter ancestor t
han the squashing layer" }, | |
| 73 { CompositingReasonSquashingWouldBreakPaintOrder, | |
| 74 "squashingWouldBreakPaintOrder", | |
| 75 "Cannot be squashed without breaking paint order" }, | |
| 76 { CompositingReasonSquashingVideoIsDisallowed, | |
| 77 "squashingVideoIsDisallowed", | |
| 78 "Squashing video is not supported" }, | |
| 79 { CompositingReasonSquashedLayerClipsCompositingDescendants, | |
| 80 "squashedLayerClipsCompositingDescendants", | |
| 81 "Squashing a layer that clips composited descendants is not supported."
}, | |
| 82 { CompositingReasonTransformWithCompositedDescendants, | |
| 83 "transformWithCompositedDescendants", | |
| 84 "Has a transform that needs to be known by compositor because of composi
ted descendants" }, | |
| 85 { CompositingReasonOpacityWithCompositedDescendants, | |
| 86 "opacityWithCompositedDescendants", | |
| 87 "Has opacity that needs to be applied by compositor because of composite
d descendants" }, | |
| 88 { CompositingReasonMaskWithCompositedDescendants, | |
| 89 "maskWithCompositedDescendants", | |
| 90 "Has a mask that needs to be known by compositor because of composited d
escendants" }, | |
| 91 { CompositingReasonFilterWithCompositedDescendants, | |
| 92 "filterWithCompositedDescendants", | |
| 93 "Has a filter effect that needs to be known by compositor because of com
posited descendants" }, | |
| 94 { CompositingReasonClipsCompositingDescendants, | |
| 95 "clipsCompositingDescendants", | |
| 96 "Has a clip that needs to be known by compositor because of composited d
escendants" }, | |
| 97 { CompositingReasonPerspectiveWith3DDescendants, | |
| 98 "perspectiveWith3DDescendants", | |
| 99 "Has a perspective transform that needs to be known by compositor becaus
e of 3d descendants" }, | |
| 100 { CompositingReasonPreserve3DWith3DDescendants, | |
| 101 "preserve3DWith3DDescendants", | |
| 102 "Has a preserves-3d property that needs to be known by compositor becaus
e of 3d descendants" }, | |
| 103 { CompositingReasonRoot, | |
| 104 "root", | |
| 105 "Is the root layer" }, | |
| 106 { CompositingReasonLayerForAncestorClip, | |
| 107 "layerForAncestorClip", | |
| 108 "Secondary layer, applies a clip due to a sibling in the compositing tre
e" }, | |
| 109 { CompositingReasonLayerForDescendantClip, | |
| 110 "layerForDescendantClip", | |
| 111 "Secondary layer, to clip descendants of the owning layer" }, | |
| 112 { CompositingReasonLayerForPerspective, | |
| 113 "layerForPerspective", | |
| 114 "Secondary layer, to house the perspective transform for all descendants
" }, | |
| 115 { CompositingReasonLayerForOverflowControlsHost, | |
| 116 "layerForOverflowControlsHost", | |
| 117 "Secondary layer, the overflow controls host layer" }, | |
| 118 { CompositingReasonLayerForSquashingContents, | |
| 119 "layerForSquashingContents", | |
| 120 "Secondary layer, home for a group of squashable content" }, | |
| 121 { CompositingReasonLayerForSquashingContainer, | |
| 122 "layerForSquashingContainer", | |
| 123 "Secondary layer, no-op layer to place the squashing layer correctly in
the composited layer tree" }, | |
| 124 { CompositingReasonLayerForForeground, | |
| 125 "layerForForeground", | |
| 126 "Secondary layer, to contain any normal flow and positive z-index conten
ts on top of a negative z-index layer" }, | |
| 127 { CompositingReasonLayerForBackground, | |
| 128 "layerForBackground", | |
| 129 "Secondary layer, to contain acceleratable background content" }, | |
| 130 { CompositingReasonLayerForMask, | |
| 131 "layerForMask", | |
| 132 "Secondary layer, to contain the mask contents" }, | |
| 133 { CompositingReasonLayerForClippingMask, | |
| 134 "layerForClippingMask", | |
| 135 "Secondary layer, for clipping mask" }, | |
| 136 { CompositingReasonInlineTransform, | |
| 137 "inlineTransform", | |
| 138 "Has an inline transform, which causes subsequent layers to assume overl
ap" }, | |
| 139 }; | |
| 140 | |
| 141 size_t kNumberOfCompositingReasons = WTF_ARRAY_LENGTH(kCompositingReasonStringMa
p); | |
| 142 | |
| 143 } // namespace blink | |
| OLD | NEW |