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

Unified Diff: Source/core/paint/SVGShapePainter.cpp

Issue 1252933003: Shrink SVG paint-order to take less bits (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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: Source/core/paint/SVGShapePainter.cpp
diff --git a/Source/core/paint/SVGShapePainter.cpp b/Source/core/paint/SVGShapePainter.cpp
index 2d86e8a0d8e2a77bbf71a6be6869084ea9bfbf1b..149df778b1b982917afb88bea4a32a03acc7e167 100644
--- a/Source/core/paint/SVGShapePainter.cpp
+++ b/Source/core/paint/SVGShapePainter.cpp
@@ -64,8 +64,9 @@ void SVGShapePainter::paint(const PaintInfo& paintInfo)
bool shouldAntiAlias = svgStyle.shapeRendering() != SR_CRISPEDGES;
- for (int i = 0; i < 3; i++) {
- switch (svgStyle.paintOrderType(i)) {
+ auto paintOrder = svgStyle.paintTypesForPaintOrder();
+ for (unsigned i = 0; i < paintOrder.size(); ++i) {
+ switch (paintOrder.at(i)) {
case PT_FILL: {
SkPaint fillPaint;
if (!SVGPaintContext::paintForLayoutObject(paintContext.paintInfo(), m_layoutSVGShape.styleRef(), m_layoutSVGShape, ApplyToFillMode, fillPaint))

Powered by Google App Engine
This is Rietveld 408576698