Chromium Code Reviews| Index: third_party/WebKit/Source/core/paint/SVGShapePainter.cpp |
| diff --git a/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp b/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp |
| index 3862fc28700e64bd8bab6eaebfe854ee4222c936..ef961fde2ef564172220d474b6be4bc9d58b5908 100644 |
| --- a/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp |
| +++ b/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp |
| @@ -12,12 +12,14 @@ |
| #include "core/layout/svg/SVGResourcesCache.h" |
| #include "core/paint/FloatClipRecorder.h" |
| #include "core/paint/LayoutObjectDrawingRecorder.h" |
| +#include "core/paint/ObjectPaintProperties.h" |
| #include "core/paint/ObjectPainter.h" |
| #include "core/paint/PaintInfo.h" |
| #include "core/paint/SVGContainerPainter.h" |
| #include "core/paint/SVGPaintContext.h" |
| #include "core/paint/TransformRecorder.h" |
| #include "platform/graphics/GraphicsContextStateSaver.h" |
| +#include "platform/graphics/paint/ScopedPaintChunkProperties.h" |
| #include "platform/graphics/paint/SkPictureBuilder.h" |
| #include "third_party/skia/include/core/SkPaint.h" |
| #include "third_party/skia/include/core/SkPicture.h" |
| @@ -52,6 +54,20 @@ void SVGShapePainter::paint(const PaintInfo& paintInfo) |
| return; |
| PaintInfo paintInfoBeforeFiltering(paintInfo); |
| + |
| + // FIXME(pdr): Extract this out and use it in all non-root SVG painters. |
|
jbroman
2016/06/09 22:16:49
TODO, not FIXME (also below). Why have you travele
pdr.
2016/06/09 23:39:04
WTF::ShameCube(pdr)
We should add a presubmit scr
|
| + Optional<ScopedPaintChunkProperties> propertyScope; |
| + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| + const auto* objectProperties = m_layoutSVGShape.objectPaintProperties(); |
| + if (objectProperties && objectProperties->transform()) { |
| + auto& paintController = paintInfoBeforeFiltering.context.getPaintController(); |
| + PaintChunkProperties properties(paintController.currentPaintChunkProperties()); |
| + // FIXME(pdr): Include other properties such as effects and clips too. |
| + properties.transform = objectProperties->transform(); |
| + propertyScope.emplace(paintController, properties); |
| + } |
| + } |
| + |
| // Shapes cannot have children so do not call updateCullRect. |
| TransformRecorder transformRecorder(paintInfoBeforeFiltering.context, m_layoutSVGShape, m_layoutSVGShape.localSVGTransform()); |
| { |