Chromium Code Reviews| Index: Source/core/paint/SVGMaskPainter.cpp |
| diff --git a/Source/core/paint/SVGMaskPainter.cpp b/Source/core/paint/SVGMaskPainter.cpp |
| index d1c326f1571c434d4f592f285ca049d17f201bc1..0e020337927d501bcf5adeb29464412b2efa2905 100644 |
| --- a/Source/core/paint/SVGMaskPainter.cpp |
| +++ b/Source/core/paint/SVGMaskPainter.cpp |
| @@ -9,10 +9,8 @@ |
| #include "core/paint/CompositingRecorder.h" |
| #include "core/paint/LayoutObjectDrawingRecorder.h" |
| #include "core/paint/PaintInfo.h" |
| -#include "core/paint/TransformRecorder.h" |
| #include "platform/graphics/paint/CompositingDisplayItem.h" |
| #include "platform/graphics/paint/DisplayItemList.h" |
| -#include "platform/graphics/paint/DrawingDisplayItem.h" |
| namespace blink { |
| @@ -73,11 +71,13 @@ void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext* context, const Lay |
| AffineTransform contentTransformation; |
| RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(contentTransformation, targetBoundingBox); |
| - TransformRecorder recorder(*context, layoutObject, contentTransformation); |
| - |
| - LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayItem::SVGMask, LayoutRect::infiniteIntRect()); |
|
chrishtr
2015/06/12 16:03:03
Curious: why did the infinite rect not work?
|
| - if (!drawingRecorder.canUseCachedDrawing()) |
| + LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayItem::SVGMask, targetBoundingBox); |
|
fs
2015/06/12 08:12:31
targetBoundingBox could be too tight - maybe expos
|
| + if (!drawingRecorder.canUseCachedDrawing()) { |
|
fs
2015/06/12 08:12:31
Early out?
|
| + context->save(); |
| + context->concatCTM(contentTransformation); |
| context->drawPicture(maskContentPicture.get()); |
| + context->restore(); |
| + } |
| } |
| } |