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

Side by Side Diff: sky/engine/core/rendering/RenderLayer.cpp

Issue 867653005: Remove outline painting on inlines. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 layerLocation, layerForegroundRect); 1142 layerLocation, layerForegroundRect);
1143 } 1143 }
1144 1144
1145 if (shouldClip) 1145 if (shouldClip)
1146 restoreClip(context, localPaintingInfo.paintDirtyRect, layerForegroundRe ct); 1146 restoreClip(context, localPaintingInfo.paintDirtyRect, layerForegroundRe ct);
1147 } 1147 }
1148 1148
1149 void RenderLayer::paintForegroundWithPhase(PaintPhase phase, GraphicsContext* co ntext, 1149 void RenderLayer::paintForegroundWithPhase(PaintPhase phase, GraphicsContext* co ntext,
1150 const LayerPaintingInfo& localPaintingInfo, RenderObject* paintingRootForRen derer, LayoutPoint& layerLocation, ClipRect& layerForegroundRect) 1150 const LayerPaintingInfo& localPaintingInfo, RenderObject* paintingRootForRen derer, LayoutPoint& layerLocation, ClipRect& layerForegroundRect)
1151 { 1151 {
1152 PaintInfo paintInfo(context, pixelSnappedIntRect(layerForegroundRect.rect()) , phase, paintingRootForRenderer, 0, localPaintingInfo.rootLayer->renderer()); 1152 PaintInfo paintInfo(context, pixelSnappedIntRect(layerForegroundRect.rect()) , phase, paintingRootForRenderer, localPaintingInfo.rootLayer->renderer());
1153 renderer()->paint(paintInfo, layerLocation); 1153 renderer()->paint(paintInfo, layerLocation);
1154 } 1154 }
1155 1155
1156 void RenderLayer::paintOutline(GraphicsContext* context, const LayerPaintingInfo & localPaintingInfo, 1156 void RenderLayer::paintOutline(GraphicsContext* context, const LayerPaintingInfo & localPaintingInfo,
1157 RenderObject* paintingRootForRenderer, LayoutPoint& layerLocation, ClipRect& layerOutlineRect) 1157 RenderObject* paintingRootForRenderer, LayoutPoint& layerLocation, ClipRect& layerOutlineRect)
1158 { 1158 {
1159 if (layerOutlineRect.isEmpty()) 1159 if (layerOutlineRect.isEmpty())
1160 return; 1160 return;
1161 1161
1162 PaintInfo paintInfo(context, pixelSnappedIntRect(layerOutlineRect.rect()), P aintPhaseSelfOutline, paintingRootForRenderer, 0, localPaintingInfo.rootLayer->r enderer()); 1162 PaintInfo paintInfo(context, pixelSnappedIntRect(layerOutlineRect.rect()), P aintPhaseSelfOutline, paintingRootForRenderer, localPaintingInfo.rootLayer->rend erer());
1163 clipToRect(localPaintingInfo, context, layerOutlineRect, DoNotIncludeSelfFor BorderRadius); 1163 clipToRect(localPaintingInfo, context, layerOutlineRect, DoNotIncludeSelfFor BorderRadius);
1164 renderer()->paint(paintInfo, layerLocation); 1164 renderer()->paint(paintInfo, layerLocation);
1165 restoreClip(context, localPaintingInfo.paintDirtyRect, layerOutlineRect); 1165 restoreClip(context, localPaintingInfo.paintDirtyRect, layerOutlineRect);
1166 } 1166 }
1167 1167
1168 void RenderLayer::paintMask(GraphicsContext* context, const LayerPaintingInfo& l ocalPaintingInfo, 1168 void RenderLayer::paintMask(GraphicsContext* context, const LayerPaintingInfo& l ocalPaintingInfo,
1169 RenderObject* paintingRootForRenderer, LayoutPoint& layerLocation, ClipRect& layerBackgroundRect) 1169 RenderObject* paintingRootForRenderer, LayoutPoint& layerLocation, ClipRect& layerBackgroundRect)
1170 { 1170 {
1171 if (localPaintingInfo.clipToDirtyRect) 1171 if (localPaintingInfo.clipToDirtyRect)
1172 clipToRect(localPaintingInfo, context, layerBackgroundRect, DoNotInclude SelfForBorderRadius); // Mask painting will handle clipping to self. 1172 clipToRect(localPaintingInfo, context, layerBackgroundRect, DoNotInclude SelfForBorderRadius); // Mask painting will handle clipping to self.
1173 1173
1174 // Paint the mask. 1174 // Paint the mask.
1175 // FIXME: Eventually we will collect the region from the fragment itself ins tead of just from the paint info. 1175 // FIXME: Eventually we will collect the region from the fragment itself ins tead of just from the paint info.
1176 PaintInfo paintInfo(context, pixelSnappedIntRect(layerBackgroundRect.rect()) , PaintPhaseMask, paintingRootForRenderer, 0, localPaintingInfo.rootLayer->rende rer()); 1176 PaintInfo paintInfo(context, pixelSnappedIntRect(layerBackgroundRect.rect()) , PaintPhaseMask, paintingRootForRenderer, localPaintingInfo.rootLayer->renderer ());
1177 renderer()->paint(paintInfo, layerLocation); 1177 renderer()->paint(paintInfo, layerLocation);
1178 1178
1179 if (localPaintingInfo.clipToDirtyRect) 1179 if (localPaintingInfo.clipToDirtyRect)
1180 restoreClip(context, localPaintingInfo.paintDirtyRect, layerBackgroundRe ct); 1180 restoreClip(context, localPaintingInfo.paintDirtyRect, layerBackgroundRe ct);
1181 } 1181 }
1182 1182
1183 void RenderLayer::paintOverflowControls(GraphicsContext* context, const LayerPai ntingInfo& localPaintingInfo, LayoutPoint& layerLocation, ClipRect& layerBackgro undRect) 1183 void RenderLayer::paintOverflowControls(GraphicsContext* context, const LayerPai ntingInfo& localPaintingInfo, LayoutPoint& layerLocation, ClipRect& layerBackgro undRect)
1184 { 1184 {
1185 clipToRect(localPaintingInfo, context, layerBackgroundRect); 1185 clipToRect(localPaintingInfo, context, layerBackgroundRect);
1186 if (RenderLayerScrollableArea* scrollableArea = this->scrollableArea()) 1186 if (RenderLayerScrollableArea* scrollableArea = this->scrollableArea())
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 } 1858 }
1859 } 1859 }
1860 1860
1861 void showLayerTree(const blink::RenderObject* renderer) 1861 void showLayerTree(const blink::RenderObject* renderer)
1862 { 1862 {
1863 if (!renderer) 1863 if (!renderer)
1864 return; 1864 return;
1865 showLayerTree(renderer->enclosingLayer()); 1865 showLayerTree(renderer->enclosingLayer());
1866 } 1866 }
1867 #endif 1867 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698