Index: Source/core/style/SVGComputedStyle.cpp |
diff --git a/Source/core/style/SVGComputedStyle.cpp b/Source/core/style/SVGComputedStyle.cpp |
index 36b237672bf134d7b8ec97ba5448eca2edf3e5b1..8cf16fbb68a4c986399e967f5575c3b375214ab1 100644 |
--- a/Source/core/style/SVGComputedStyle.cpp |
+++ b/Source/core/style/SVGComputedStyle.cpp |
@@ -236,7 +236,7 @@ bool SVGComputedStyle::diffNeedsPaintInvalidation(const SVGComputedStyle* other) |
|| svg_inherited_flags._fillRule != other->svg_inherited_flags._fillRule |
|| svg_inherited_flags._colorInterpolation != other->svg_inherited_flags._colorInterpolation |
|| svg_inherited_flags._colorInterpolationFilters != other->svg_inherited_flags._colorInterpolationFilters |
- || svg_inherited_flags._paintOrder != other->svg_inherited_flags._paintOrder) |
+ || svg_inherited_flags.paintOrder != other->svg_inherited_flags.paintOrder) |
return true; |
if (svg_noninherited_flags.f.bufferedRendering != other->svg_noninherited_flags.f.bufferedRendering) |
@@ -248,11 +248,44 @@ bool SVGComputedStyle::diffNeedsPaintInvalidation(const SVGComputedStyle* other) |
return false; |
} |
-EPaintOrderType SVGComputedStyle::paintOrderType(unsigned index) const |
+Vector<EPaintOrderType, 3> SVGComputedStyle::paintTypesForPaintOrder() const |
pdr.
2015/07/29 05:20:50
Returning a Vector seems a bit heavy for this code
Shanmuga Pandi
2015/07/29 06:55:04
Ok. I will try to change the code as you suggested
|
{ |
- ASSERT(index < ((1 << kPaintOrderBitwidth)-1)); |
- unsigned pt = (paintOrder() >> (kPaintOrderBitwidth*index)) & ((1u << kPaintOrderBitwidth) - 1); |
- return (EPaintOrderType)pt; |
+ Vector<EPaintOrderType, 3> paintOrder; |
+ switch (this->paintOrder()) { |
+ case PaintOrderNormal: |
+ case PaintOrderFill: |
+ paintOrder.append(PT_FILL); |
+ paintOrder.append(PT_STROKE); |
+ paintOrder.append(PT_MARKERS); |
+ break; |
+ case PaintOrderFillMarkers: |
+ paintOrder.append(PT_FILL); |
+ paintOrder.append(PT_MARKERS); |
+ paintOrder.append(PT_STROKE); |
+ break; |
+ case PaintOrderStroke: |
+ paintOrder.append(PT_STROKE); |
+ paintOrder.append(PT_FILL); |
+ paintOrder.append(PT_MARKERS); |
+ break; |
+ case PaintOrderStrokeMarkers: |
+ paintOrder.append(PT_STROKE); |
+ paintOrder.append(PT_MARKERS); |
+ paintOrder.append(PT_FILL); |
+ break; |
+ case PaintOrderMarkers: |
+ paintOrder.append(PT_MARKERS); |
+ paintOrder.append(PT_FILL); |
+ paintOrder.append(PT_STROKE); |
+ break; |
+ case PaintOrderMarkersStroke: |
+ paintOrder.append(PT_MARKERS); |
+ paintOrder.append(PT_STROKE); |
+ paintOrder.append(PT_FILL); |
+ break; |
+ } |
+ |
+ return paintOrder; |
} |
} |