Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "wtf/MathExtras.h" | 9 #include "wtf/MathExtras.h" |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 54 const uint64_t CompositingReasonIsolateCompositedDescendants = UINT6 4_C(1) << 38; | 54 const uint64_t CompositingReasonIsolateCompositedDescendants = UINT6 4_C(1) << 38; |
| 55 | 55 |
| 56 // The root layer is a special case that may be forced to be a layer, but also i t needs to be | 56 // The root layer is a special case that may be forced to be a layer, but also i t needs to be |
| 57 // a layer if anything else in the subtree is composited. | 57 // a layer if anything else in the subtree is composited. |
| 58 const uint64_t CompositingReasonRoot = UINT6 4_C(1) << 39; | 58 const uint64_t CompositingReasonRoot = UINT6 4_C(1) << 39; |
| 59 | 59 |
| 60 // CompositedLayerMapping internal hierarchy reasons | 60 // CompositedLayerMapping internal hierarchy reasons |
| 61 const uint64_t CompositingReasonLayerForAncestorClip = UINT6 4_C(1) << 40; | 61 const uint64_t CompositingReasonLayerForAncestorClip = UINT6 4_C(1) << 40; |
| 62 const uint64_t CompositingReasonLayerForDescendantClip = UINT6 4_C(1) << 41; | 62 const uint64_t CompositingReasonLayerForDescendantClip = UINT6 4_C(1) << 41; |
| 63 const uint64_t CompositingReasonLayerForPerspective = UINT6 4_C(1) << 42; | 63 const uint64_t CompositingReasonLayerForPerspective = UINT6 4_C(1) << 42; |
| 64 const uint64_t CompositingReasonLayerForHorizontalScrollbar = UINT6 4_C(1) << 43; | |
| 65 const uint64_t CompositingReasonLayerForVerticalScrollbar = UINT6 4_C(1) << 44; | |
|
ojan
2014/11/11 23:02:53
Nit: here and elsewhere, put a TODO to cleanup the
| |
| 66 const uint64_t CompositingReasonLayerForOverflowControlsHost = UINT6 4_C(1) << 45; | 64 const uint64_t CompositingReasonLayerForOverflowControlsHost = UINT6 4_C(1) << 45; |
| 67 // FIXME(sky): 46 is unused. | 65 // FIXME(sky): 46 is unused. |
| 68 const uint64_t CompositingReasonLayerForScrollingContents = UINT6 4_C(1) << 47; | |
| 69 const uint64_t CompositingReasonLayerForScrollingContainer = UINT6 4_C(1) << 48; | |
| 70 const uint64_t CompositingReasonLayerForSquashingContents = UINT6 4_C(1) << 49; | 66 const uint64_t CompositingReasonLayerForSquashingContents = UINT6 4_C(1) << 49; |
| 71 const uint64_t CompositingReasonLayerForSquashingContainer = UINT6 4_C(1) << 50; | 67 const uint64_t CompositingReasonLayerForSquashingContainer = UINT6 4_C(1) << 50; |
| 72 const uint64_t CompositingReasonLayerForForeground = UINT6 4_C(1) << 51; | 68 const uint64_t CompositingReasonLayerForForeground = UINT6 4_C(1) << 51; |
| 73 const uint64_t CompositingReasonLayerForBackground = UINT6 4_C(1) << 52; | 69 const uint64_t CompositingReasonLayerForBackground = UINT6 4_C(1) << 52; |
| 74 const uint64_t CompositingReasonLayerForMask = UINT6 4_C(1) << 53; | 70 const uint64_t CompositingReasonLayerForMask = UINT6 4_C(1) << 53; |
| 75 const uint64_t CompositingReasonLayerForClippingMask = UINT6 4_C(1) << 54; | 71 const uint64_t CompositingReasonLayerForClippingMask = UINT6 4_C(1) << 54; |
| 76 const uint64_t CompositingReasonLayerForScrollingBlockSelection = UINT6 4_C(1) << 55; | |
| 77 | 72 |
| 78 // Composited elements with inline transforms trigger assumed overlap so that | 73 // Composited elements with inline transforms trigger assumed overlap so that |
| 79 // we can update their transforms quickly. | 74 // we can update their transforms quickly. |
| 80 const uint64_t CompositingReasonInlineTransform = UINT6 4_C(1) << 56; | 75 const uint64_t CompositingReasonInlineTransform = UINT6 4_C(1) << 56; |
| 81 | 76 |
| 82 // Various combinations of compositing reasons are defined here also, for more i ntutive and faster bitwise logic. | 77 // Various combinations of compositing reasons are defined here also, for more i ntutive and faster bitwise logic. |
| 83 const uint64_t CompositingReasonComboAllDirectReasons = | 78 const uint64_t CompositingReasonComboAllDirectReasons = |
| 84 CompositingReason3DTransform | 79 CompositingReason3DTransform |
| 85 | CompositingReasonVideo | 80 | CompositingReasonVideo |
| 86 | CompositingReasonCanvas | 81 | CompositingReasonCanvas |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 164 const char* shortName; | 159 const char* shortName; |
| 165 const char* description; | 160 const char* description; |
| 166 }; | 161 }; |
| 167 | 162 |
| 168 PLATFORM_EXPORT extern const CompositingReasonStringMap kCompositingReasonString Map[]; | 163 PLATFORM_EXPORT extern const CompositingReasonStringMap kCompositingReasonString Map[]; |
| 169 PLATFORM_EXPORT extern size_t kNumberOfCompositingReasons; | 164 PLATFORM_EXPORT extern size_t kNumberOfCompositingReasons; |
| 170 | 165 |
| 171 } // namespace blink | 166 } // namespace blink |
| 172 | 167 |
| 173 #endif // CompositingReasons_h | 168 #endif // CompositingReasons_h |
| OLD | NEW |