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

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

Issue 878023002: Merge outline paint phases into the foreground phase. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: rebase 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/RenderLayer.cpp
diff --git a/sky/engine/core/rendering/RenderLayer.cpp b/sky/engine/core/rendering/RenderLayer.cpp
index b842fba65ac1d35ca4c937c55c5e95a52e931cae..8cb428018fc2822d9abf7198e95765539b0222db 100644
--- a/sky/engine/core/rendering/RenderLayer.cpp
+++ b/sky/engine/core/rendering/RenderLayer.cpp
@@ -991,10 +991,10 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
FilterEffectRendererHelper filterPainter(filterRenderer() && paintsWithFilters());
LayoutRect layerBounds;
- ClipRect backgroundRect, foregroundRect, outlineRect;
+ ClipRect backgroundRect, foregroundRect;
ClipRectsContext clipRectsContext(localPaintingInfo.rootLayer, PaintingClipRects, localPaintingInfo.subPixelAccumulation);
clipper().calculateRects(clipRectsContext, localPaintingInfo.paintDirtyRect,
- layerBounds, backgroundRect, foregroundRect, outlineRect,
+ layerBounds, backgroundRect, foregroundRect,
&offsetFromRoot);
bool isPaintingOverlayScrollbars = paintFlags == PaintOverlayScrollbars;
@@ -1048,7 +1048,6 @@ void RenderLayer::paintLayerContents(GraphicsContext* context, const LayerPainti
localPaintingInfo, paintingRootForRenderer, layerLocation, foregroundRect);
}
- paintOutline(context, localPaintingInfo, paintingRootForRenderer, layerLocation, outlineRect);
paintChildren(NormalFlowChildren | PositiveZOrderChildren, context, paintingInfo, paintFlags);
if (isPaintingOverlayScrollbars)
@@ -1135,9 +1134,6 @@ void RenderLayer::paintForeground(GraphicsContext* context, GraphicsContext* tra
paintForegroundWithPhase(PaintPhaseForeground,
context, localPaintingInfo, paintingRootForRenderer,
layerLocation, layerForegroundRect);
- paintForegroundWithPhase(PaintPhaseChildOutlines,
- context, localPaintingInfo, paintingRootForRenderer,
- layerLocation, layerForegroundRect);
}
if (shouldClip)
@@ -1151,18 +1147,6 @@ void RenderLayer::paintForegroundWithPhase(PaintPhase phase, GraphicsContext* co
renderer()->paint(paintInfo, layerLocation);
}
-void RenderLayer::paintOutline(GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo,
- RenderObject* paintingRootForRenderer, LayoutPoint& layerLocation, ClipRect& layerOutlineRect)
-{
- if (layerOutlineRect.isEmpty())
- return;
-
- PaintInfo paintInfo(context, pixelSnappedIntRect(layerOutlineRect.rect()), PaintPhaseSelfOutline, paintingRootForRenderer, localPaintingInfo.rootLayer->renderer());
- clipToRect(localPaintingInfo, context, layerOutlineRect, DoNotIncludeSelfForBorderRadius);
- renderer()->paint(paintInfo, layerLocation);
- restoreClip(context, localPaintingInfo.paintDirtyRect, layerOutlineRect);
-}
-
void RenderLayer::paintMask(GraphicsContext* context, const LayerPaintingInfo& localPaintingInfo,
RenderObject* paintingRootForRenderer, LayoutPoint& layerLocation, ClipRect& layerBackgroundRect)
{
@@ -1416,9 +1400,9 @@ RenderLayer* RenderLayer::hitTestLayer(RenderLayer* rootLayer, RenderLayer* cont
}
LayoutRect layerBounds;
- ClipRect backgroundRect, foregroundRect, outlineRect;
+ ClipRect backgroundRect, foregroundRect;
ClipRectsContext clipRectsContext(rootLayer, RootRelativeClipRects);
- clipper().calculateRects(clipRectsContext, hitTestRect, layerBounds, backgroundRect, foregroundRect, outlineRect);
+ clipper().calculateRects(clipRectsContext, hitTestRect, layerBounds, backgroundRect, foregroundRect);
// Next we want to see if the mouse pos is inside the child RenderObjects of the layer.
if (isSelfPaintingLayer() && foregroundRect.intersects(hitTestLocation)) {

Powered by Google App Engine
This is Rietveld 408576698