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

Unified Diff: Source/platform/graphics/CompositingReasons.h

Issue 215063006: Separate the geometry update from rebuilding the GraphicsLayer tree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 8 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
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/CompositingReasons.h
diff --git a/Source/platform/graphics/CompositingReasons.h b/Source/platform/graphics/CompositingReasons.h
index 513be298323dcc2168b0fc5615a7205fd3245c7a..fc3c8dd22a626c802f3111ab3b76d0cc6d44e529 100644
--- a/Source/platform/graphics/CompositingReasons.h
+++ b/Source/platform/graphics/CompositingReasons.h
@@ -117,6 +117,18 @@ const uint64_t CompositingReasonComboSquashableReasons =
typedef uint64_t CompositingReasons;
+// Any reasons other than overlap or assumed overlap will require the layer to be separately compositing.
+inline bool requiresCompositing(CompositingReasons reasons)
+{
+ return reasons & ~CompositingReasonComboSquashableReasons;
+}
+
+// If the layer has overlap or assumed overlap, but no other reasons, then it should be squashed.
+inline bool requiresSquashing(CompositingReasons reasons)
+{
+ return !requiresCompositing(reasons) && (reasons & CompositingReasonComboSquashableReasons);
+}
+
struct CompositingReasonStringMap {
CompositingReasons reason;
const char* shortName;
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698