OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "config.h" | 5 #include "config.h" |
6 #include "core/paint/SVGMaskPainter.h" | 6 #include "core/paint/SVGMaskPainter.h" |
7 | 7 |
8 #include "core/layout/svg/LayoutSVGResourceMasker.h" | 8 #include "core/layout/svg/LayoutSVGResourceMasker.h" |
9 #include "core/paint/CompositingRecorder.h" | 9 #include "core/paint/CompositingRecorder.h" |
10 #include "core/paint/LayoutObjectDrawingRecorder.h" | 10 #include "core/paint/LayoutObjectDrawingRecorder.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 } | 70 } |
71 | 71 |
72 void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext* context, const Lay
outObject& layoutObject, const FloatRect& targetBoundingBox, const FloatRect& ta
rgetPaintInvalidationRect) | 72 void SVGMaskPainter::drawMaskForLayoutObject(GraphicsContext* context, const Lay
outObject& layoutObject, const FloatRect& targetBoundingBox, const FloatRect& ta
rgetPaintInvalidationRect) |
73 { | 73 { |
74 ASSERT(context); | 74 ASSERT(context); |
75 | 75 |
76 AffineTransform contentTransformation; | 76 AffineTransform contentTransformation; |
77 RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(con
tentTransformation, targetBoundingBox, context); | 77 RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(con
tentTransformation, targetBoundingBox, context); |
78 | 78 |
79 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, layout
Object, DisplayItem::SVGMask)) | 79 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, layout
Object, DisplayItem::SVGMask, LayoutPoint())) |
80 return; | 80 return; |
81 | 81 |
82 LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayI
tem::SVGMask, targetPaintInvalidationRect); | 82 LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayI
tem::SVGMask, targetPaintInvalidationRect, LayoutPoint()); |
83 context->save(); | 83 context->save(); |
84 context->concatCTM(contentTransformation); | 84 context->concatCTM(contentTransformation); |
85 context->drawPicture(maskContentPicture.get()); | 85 context->drawPicture(maskContentPicture.get()); |
86 context->restore(); | 86 context->restore(); |
87 } | 87 } |
88 | 88 |
89 } | 89 } |
OLD | NEW |