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

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

Issue 891573002: Removed a bunch of unneeded paint phase checks. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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: sky/engine/core/rendering/InlineFlowBox.cpp
diff --git a/sky/engine/core/rendering/InlineFlowBox.cpp b/sky/engine/core/rendering/InlineFlowBox.cpp
index 5d6a00ad28ef56d72a6b9038987ce3fccc698054..0f713dee0d5d6305cd526343cd6320f27b53e20c 100644
--- a/sky/engine/core/rendering/InlineFlowBox.cpp
+++ b/sky/engine/core/rendering/InlineFlowBox.cpp
@@ -1002,8 +1002,7 @@ void InlineFlowBox::paint(PaintInfo& paintInfo, const LayoutPoint& paintOffset,
return;
}
- if (paintInfo.phase == PaintPhaseForeground)
- paintBoxDecorationBackground(paintInfo, paintOffset);
+ paintBoxDecorationBackground(paintInfo, paintOffset);
for (InlineBox* curr = firstChild(); curr; curr = curr->nextOnLine()) {
if (curr->renderer().isText() || !curr->boxModelObject()->hasSelfPaintingLayer())
@@ -1099,8 +1098,6 @@ static LayoutRect clipRectForNinePieceImageStrip(InlineFlowBox* box, const NineP
void InlineFlowBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- ASSERT(paintInfo.phase == PaintPhaseForeground);
-
// You can use p::first-line to specify a background. If so, the root line boxes for
// a line may actually have to paint a background.
RenderStyle* styleToUse = renderer().style(isFirstLineStyle());
@@ -1173,9 +1170,6 @@ void InlineFlowBox::paintBoxDecorationBackground(PaintInfo& paintInfo, const Lay
void InlineFlowBox::paintMask(PaintInfo& paintInfo, const LayoutPoint& paintOffset)
{
- if (paintInfo.phase != PaintPhaseMask)
ojan 2015/01/30 01:25:59 The caller already does this check.
abarth-chromium 2015/01/30 02:37:56 ASSERT?
ojan 2015/01/30 02:54:49 I'll be removing the paint phase entirely in my ne
- return;
-
// Pixel snap mask painting.
LayoutRect frameRect = roundedFrameRect();
« no previous file with comments | « no previous file | sky/engine/core/rendering/InlineTextBox.cpp » ('j') | sky/engine/core/rendering/InlineTextBox.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698