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

Unified Diff: Source/core/rendering/RenderLayerCompositor.cpp

Issue 18005002: Refactoring RenderLayerCompositor to avoid redundant checks for Compositing reasons (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayerCompositor.cpp
diff --git a/Source/core/rendering/RenderLayerCompositor.cpp b/Source/core/rendering/RenderLayerCompositor.cpp
index f472d127bcb8eb2dfaba789a65cf4fab397f1700..ff2a71e54fef71e39cd825d0dca290106f3a942d 100644
--- a/Source/core/rendering/RenderLayerCompositor.cpp
+++ b/Source/core/rendering/RenderLayerCompositor.cpp
@@ -1576,23 +1576,17 @@ CompositingReasons RenderLayerCompositor::directReasonsForCompositing(const Rend
if (requiresCompositingForVideo(renderer))
directReasons |= CompositingReasonVideo;
-
- if (requiresCompositingForCanvas(renderer))
+ else if (requiresCompositingForCanvas(renderer))
shawnsingh 2013/07/01 06:23:28 Let's add a brief comment at the beginning of this
pals 2013/07/01 07:41:57 Done.
directReasons |= CompositingReasonCanvas;
-
- if (requiresCompositingForPlugin(renderer))
+ else if (requiresCompositingForPlugin(renderer))
directReasons |= CompositingReasonPlugin;
-
- if (requiresCompositingForFrame(renderer))
+ else if (requiresCompositingForFrame(renderer))
directReasons |= CompositingReasonIFrame;
if (requiresCompositingForBackfaceVisibilityHidden(renderer))
directReasons |= CompositingReasonBackfaceVisibilityHidden;
- if (requiresCompositingForAnimation(renderer))
- directReasons |= CompositingReasonAnimation;
-
- if (requiresCompositingForTransition(renderer))
+ if (requiresCompositingForTransition(renderer) || requiresCompositingForAnimation(renderer))
shawnsingh 2013/07/01 06:23:28 This particular line, let's not combine these. We
pals 2013/07/01 07:41:57 Done.
directReasons |= CompositingReasonAnimation;
if (requiresCompositingForFilters(renderer))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698