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

Unified Diff: public/platform/WebCompositingReasons.h

Issue 15181006: Plumb CompositingReason from Blink to compositor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Version with compositing reasons initialized on creation Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: public/platform/WebCompositingReasons.h
diff --git a/public/platform/WebCompositingReasons.h b/public/platform/WebCompositingReasons.h
new file mode 100644
index 0000000000000000000000000000000000000000..10370a631fa472532e821603ecb8782cab55af15
--- /dev/null
+++ b/public/platform/WebCompositingReasons.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2013 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebCompositingReasons_h
+#define WebCompositingReasons_h
+
+// This define will go away after landing both chromium and blink sides.
+#define USE_WEB_COMPOSITING_REASONS 1
+
+namespace WebKit {
+
+// This is a clone of CompositingReasons enum in RenderLayer.h,
+enum {
+ CompositingReasonUnknown = 0,
+ CompositingReason3DTransform = 1 << 0,
+ CompositingReasonVideo = 1 << 1,
+ CompositingReasonCanvas = 1 << 2,
+ CompositingReasonPlugin = 1 << 3,
+ CompositingReasonIFrame = 1 << 4,
+ CompositingReasonBackfaceVisibilityHidden = 1 << 5,
+ CompositingReasonAnimation = 1 << 6,
+ CompositingReasonTransition = 1 << 7,
+ CompositingReasonFilters = 1 << 8,
+ CompositingReasonPositionFixed = 1 << 9,
+ CompositingReasonPositionSticky = 1 << 10,
+ CompositingReasonOverflowScrollingTouch = 1 << 11,
+ CompositingReasonBlending = 1 << 12,
+ CompositingReasonAssumedOverlap = 1 << 13,
+ CompositingReasonOverlap = 1 << 14,
+ CompositingReasonNegativeZIndexChildren = 1 << 15,
+ CompositingReasonTransformWithCompositedDescendants = 1 << 16,
+ CompositingReasonOpacityWithCompositedDescendants = 1 << 17,
+ CompositingReasonMaskWithCompositedDescendants = 1 << 18,
+ CompositingReasonReflectionWithCompositedDescendants = 1 << 19,
+ CompositingReasonFilterWithCompositedDescendants = 1 << 20,
+ CompositingReasonBlendingWithCompositedDescendants = 1 << 21,
+ CompositingReasonClipsCompositingDescendants = 1 << 22,
+ CompositingReasonPerspective = 1 << 23,
+ CompositingReasonPreserve3D = 1 << 24,
+ CompositingReasonReflectionOfCompositedParent = 1 << 25,
+ CompositingReasonRoot = 1 << 26,
+ CompositingReasonLayerForClip = 1 << 27,
+ CompositingReasonLayerForDescendantClip = 1 << 28,
+ CompositingReasonLayerForScrollbar = 1 << 29,
+ CompositingReasonLayerForScrollingContainer = 1 << 30,
+ CompositingReasonLayerForForeground = 1 << 31
+};
+
+// It is a typedef to allow bitwise operators to be used without type casts.
+typedef unsigned WebCompositingReasons;
+
+} // namespace WebKit
+
+#endif // WebCompositingReasons_h

Powered by Google App Engine
This is Rietveld 408576698