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

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

Issue 768493002: Get rid of CompositingState. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: fix incorrect case. 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
Index: sky/engine/core/rendering/RenderBox.cpp
diff --git a/sky/engine/core/rendering/RenderBox.cpp b/sky/engine/core/rendering/RenderBox.cpp
index 5b684cc259ab3f533bd29785e3254daaca02a05f..337f8b80fefe3ee29b5e55b397e29269dee12a31 100644
--- a/sky/engine/core/rendering/RenderBox.cpp
+++ b/sky/engine/core/rendering/RenderBox.cpp
@@ -828,9 +828,6 @@ static bool isCandidateForOpaquenessTest(RenderBox* childBox)
if (!childBox->width() || !childBox->height())
return false;
if (RenderLayer* childLayer = childBox->layer()) {
- // FIXME: perhaps this could be less conservative?
- if (childLayer->compositingState() != NotComposited)
- return false;
// FIXME: Deal with z-index.
if (!childStyle->hasAutoZIndex())
return false;
@@ -925,18 +922,7 @@ void RenderBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
void RenderBox::paintClippingMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
ojan 2014/11/27 02:09:20 It looks like clipping masks depended on the compo
{
- if (!paintInfo.shouldPaintWithinRoot(this) || paintInfo.phase != PaintPhaseClippingMask)
- return;
-
- if (!layer() || layer()->compositingState() != PaintsIntoOwnBacking)
- return;
-
- // We should never have this state in this function. A layer with a mask
- // should have always created its own backing if it became composited.
- ASSERT(layer()->compositingState() != HasOwnBackingButPaintsIntoAncestor);
-
- LayoutRect paintRect = LayoutRect(paintOffset, size());
- paintInfo.context->fillRect(pixelSnappedIntRect(paintRect), Color::black);
+ // FIXME(sky): Remove
}
void RenderBox::paintMaskImages(const PaintInfo& paintInfo, const LayoutRect& paintRect)
@@ -1081,7 +1067,7 @@ InvalidationReason RenderBox::invalidatePaintIfNeeded(const PaintInvalidationSta
// issue paint invalidations. We can then skip issuing of paint invalidations for the child
// renderers as they'll be covered by the RenderView.
if (!view()->doingFullPaintInvalidation()) {
- if ((onlyNeededPositionedMovementLayout() && compositingState() != PaintsIntoOwnBacking)
+ if (onlyNeededPositionedMovementLayout()
|| (shouldDoFullPaintInvalidationIfSelfPaintingLayer()
&& hasLayer()
&& layer()->isSelfPaintingLayer())) {

Powered by Google App Engine
This is Rietveld 408576698