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

Unified Diff: sky/engine/core/rendering/RenderBox.cpp

Issue 766943003: Remove uses of PaintBehaviorFlattenCompositingLayers (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/rendering/PaintPhase.h ('k') | sky/engine/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/rendering/RenderBox.cpp
diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp
index 083e1a6deb8987959230d99ec2ed3e911cde2392..93c12e22f28de00c380ee74d54816af93393832d 100644
--- a/sky/engine/core/rendering/RenderBox.cpp
+++ b/sky/engine/core/rendering/RenderBox.cpp
@@ -921,36 +921,8 @@ void RenderBox::paintClippingMask(PaintInfo& paintInfo, const LayoutPoint& paint
void RenderBox::paintMaskImages(const PaintInfo& paintInfo, const LayoutRect& paintRect)
{
- // Figure out if we need to push a transparency layer to render our mask.
- bool pushTransparencyLayer = false;
- bool flattenCompositingLayers = view()->frameView() && view()->frameView()->paintBehavior() & PaintBehaviorFlattenCompositingLayers;
- CompositeOperator compositeOp = CompositeSourceOver;
-
- bool allMaskImagesLoaded = true;
-
- if (flattenCompositingLayers) {
- pushTransparencyLayer = true;
- StyleImage* maskBoxImage = style()->maskBoxImage().image();
- const FillLayer& maskLayers = style()->maskLayers();
-
- // Don't render a masked element until all the mask images have loaded, to prevent a flash of unmasked content.
- if (maskBoxImage)
- allMaskImagesLoaded &= maskBoxImage->isLoaded();
-
- allMaskImagesLoaded &= maskLayers.imagesAreLoaded();
-
- paintInfo.context->setCompositeOperation(CompositeDestinationIn);
- paintInfo.context->beginTransparencyLayer(1);
- compositeOp = CompositeSourceOver;
- }
-
- if (allMaskImagesLoaded) {
- paintFillLayers(paintInfo, Color::transparent, style()->maskLayers(), paintRect, BackgroundBleedNone, compositeOp);
- paintNinePieceImage(paintInfo.context, paintRect, style(), style()->maskBoxImage(), compositeOp);
- }
-
- if (pushTransparencyLayer)
- paintInfo.context->endLayer();
+ paintFillLayers(paintInfo, Color::transparent, style()->maskLayers(), paintRect, BackgroundBleedNone, CompositeSourceOver);
+ paintNinePieceImage(paintInfo.context, paintRect, style(), style()->maskBoxImage(), CompositeSourceOver);
ojan 2014/12/01 19:00:38 Do paintFillLayers and/or paintNinePieceImage ever
rafaelw 2014/12/01 19:26:11 Nope. done. Also paintFillLayer
}
void RenderBox::paintFillLayers(const PaintInfo& paintInfo, const Color& c, const FillLayer& fillLayer, const LayoutRect& rect,
« no previous file with comments | « sky/engine/core/rendering/PaintPhase.h ('k') | sky/engine/core/rendering/RenderLayer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698