1 // Copyright 2013 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.
5 #include "base/basictypes.h"
7 #include "cc/layers/compositing_reasons.h"
8 #include "third_party/WebKit/public/platform/WebCompositingReasons.h"
10 #define COMPILE_ASSERT_MATCHING_UINT64(cc_name, webkit_name) \
11 COMPILE_ASSERT(cc_name == webkit_name, mismatching_uint64)
13 COMPILE_ASSERT_MATCHING_UINT64(
14 cc::kCompositingReasonUnknown
,
15 blink::CompositingReasonUnknown
);
17 COMPILE_ASSERT_MATCHING_UINT64(
18 cc::kCompositingReason3DTransform
,
19 blink::CompositingReason3DTransform
);
21 COMPILE_ASSERT_MATCHING_UINT64(
22 cc::kCompositingReasonVideo
,
23 blink::CompositingReasonVideo
);
25 COMPILE_ASSERT_MATCHING_UINT64(
26 cc::kCompositingReasonCanvas
,
27 blink::CompositingReasonCanvas
);
29 COMPILE_ASSERT_MATCHING_UINT64(
30 cc::kCompositingReasonPlugin
,
31 blink::CompositingReasonPlugin
);
33 COMPILE_ASSERT_MATCHING_UINT64(
34 cc::kCompositingReasonIFrame
,
35 blink::CompositingReasonIFrame
);
37 COMPILE_ASSERT_MATCHING_UINT64(
38 cc::kCompositingReasonBackfaceVisibilityHidden
,
39 blink::CompositingReasonBackfaceVisibilityHidden
);
41 COMPILE_ASSERT_MATCHING_UINT64(
42 cc::kCompositingReasonAnimation
,
43 blink::CompositingReasonAnimation
);
45 COMPILE_ASSERT_MATCHING_UINT64(
46 cc::kCompositingReasonFilters
,
47 blink::CompositingReasonFilters
);
49 COMPILE_ASSERT_MATCHING_UINT64(
50 cc::kCompositingReasonPositionFixed
,
51 blink::CompositingReasonPositionFixed
);
53 COMPILE_ASSERT_MATCHING_UINT64(
54 cc::kCompositingReasonPositionSticky
,
55 blink::CompositingReasonPositionSticky
);
57 COMPILE_ASSERT_MATCHING_UINT64(
58 cc::kCompositingReasonOverflowScrollingTouch
,
59 blink::CompositingReasonOverflowScrollingTouch
);
61 COMPILE_ASSERT_MATCHING_UINT64(
62 cc::kCompositingReasonAssumedOverlap
,
63 blink::CompositingReasonAssumedOverlap
);
65 COMPILE_ASSERT_MATCHING_UINT64(
66 cc::kCompositingReasonOverlap
,
67 blink::CompositingReasonOverlap
);
69 COMPILE_ASSERT_MATCHING_UINT64(
70 cc::kCompositingReasonNegativeZIndexChildren
,
71 blink::CompositingReasonNegativeZIndexChildren
);
73 COMPILE_ASSERT_MATCHING_UINT64(
74 cc::kCompositingReasonTransformWithCompositedDescendants
,
75 blink::CompositingReasonTransformWithCompositedDescendants
);
77 COMPILE_ASSERT_MATCHING_UINT64(
78 cc::kCompositingReasonOpacityWithCompositedDescendants
,
79 blink::CompositingReasonOpacityWithCompositedDescendants
);
81 COMPILE_ASSERT_MATCHING_UINT64(
82 cc::kCompositingReasonMaskWithCompositedDescendants
,
83 blink::CompositingReasonMaskWithCompositedDescendants
);
85 COMPILE_ASSERT_MATCHING_UINT64(
86 cc::kCompositingReasonReflectionWithCompositedDescendants
,
87 blink::CompositingReasonReflectionWithCompositedDescendants
);
89 COMPILE_ASSERT_MATCHING_UINT64(
90 cc::kCompositingReasonFilterWithCompositedDescendants
,
91 blink::CompositingReasonFilterWithCompositedDescendants
);
93 COMPILE_ASSERT_MATCHING_UINT64(
94 cc::kCompositingReasonBlendingWithCompositedDescendants
,
95 blink::CompositingReasonBlendingWithCompositedDescendants
);
97 COMPILE_ASSERT_MATCHING_UINT64(
98 cc::kCompositingReasonClipsCompositingDescendants
,
99 blink::CompositingReasonClipsCompositingDescendants
);
101 COMPILE_ASSERT_MATCHING_UINT64(
102 cc::kCompositingReasonPerspective
,
103 blink::CompositingReasonPerspective
);
105 COMPILE_ASSERT_MATCHING_UINT64(
106 cc::kCompositingReasonPreserve3D
,
107 blink::CompositingReasonPreserve3D
);
109 COMPILE_ASSERT_MATCHING_UINT64(
110 cc::kCompositingReasonReflectionOfCompositedParent
,
111 blink::CompositingReasonReflectionOfCompositedParent
);
113 COMPILE_ASSERT_MATCHING_UINT64(
114 cc::kCompositingReasonRoot
,
115 blink::CompositingReasonRoot
);
117 COMPILE_ASSERT_MATCHING_UINT64(
118 cc::kCompositingReasonLayerForClip
,
119 blink::CompositingReasonLayerForClip
);
121 COMPILE_ASSERT_MATCHING_UINT64(
122 cc::kCompositingReasonLayerForScrollbar
,
123 blink::CompositingReasonLayerForScrollbar
);
125 COMPILE_ASSERT_MATCHING_UINT64(
126 cc::kCompositingReasonLayerForScrollingContainer
,
127 blink::CompositingReasonLayerForScrollingContainer
);
129 COMPILE_ASSERT_MATCHING_UINT64(
130 cc::kCompositingReasonLayerForForeground
,
131 blink::CompositingReasonLayerForForeground
);
133 COMPILE_ASSERT_MATCHING_UINT64(
134 cc::kCompositingReasonLayerForBackground
,
135 blink::CompositingReasonLayerForBackground
);
137 COMPILE_ASSERT_MATCHING_UINT64(
138 cc::kCompositingReasonLayerForMask
,
139 blink::CompositingReasonLayerForMask
);
141 COMPILE_ASSERT_MATCHING_UINT64(
142 cc::kCompositingReasonOverflowScrollingParent
,
143 blink::CompositingReasonOverflowScrollingParent
);
145 COMPILE_ASSERT_MATCHING_UINT64(
146 cc::kCompositingReasonOutOfFlowClipping
,
147 blink::CompositingReasonOutOfFlowClipping
);