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/SVGClipPainter.h" | 6 #include "core/paint/SVGClipPainter.h" |
7 | 7 |
8 #include "core/dom/ElementTraversal.h" | 8 #include "core/dom/ElementTraversal.h" |
9 #include "core/layout/svg/LayoutSVGResourceClipper.h" | 9 #include "core/layout/svg/LayoutSVGResourceClipper.h" |
10 #include "core/layout/svg/SVGResources.h" | 10 #include "core/layout/svg/SVGResources.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 } | 128 } |
129 } | 129 } |
130 | 130 |
131 void SVGClipPainter::drawClipMaskContent(GraphicsContext* context, const LayoutO
bject& layoutObject, const FloatRect& targetBoundingBox, const FloatRect& target
PaintInvalidationRect) | 131 void SVGClipPainter::drawClipMaskContent(GraphicsContext* context, const LayoutO
bject& layoutObject, const FloatRect& targetBoundingBox, const FloatRect& target
PaintInvalidationRect) |
132 { | 132 { |
133 ASSERT(context); | 133 ASSERT(context); |
134 | 134 |
135 AffineTransform contentTransformation; | 135 AffineTransform contentTransformation; |
136 RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPicture(con
tentTransformation, targetBoundingBox, context); | 136 RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPicture(con
tentTransformation, targetBoundingBox, context); |
137 | 137 |
138 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, layout
Object, DisplayItem::SVGClip)) | 138 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(*context, layout
Object, DisplayItem::SVGClip, LayoutPoint())) |
139 return; | 139 return; |
140 | 140 |
141 LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayI
tem::SVGClip, targetPaintInvalidationRect); | 141 LayoutObjectDrawingRecorder drawingRecorder(*context, layoutObject, DisplayI
tem::SVGClip, targetPaintInvalidationRect, LayoutPoint()); |
142 context->save(); | 142 context->save(); |
143 context->concatCTM(contentTransformation); | 143 context->concatCTM(contentTransformation); |
144 context->drawPicture(clipContentPicture.get()); | 144 context->drawPicture(clipContentPicture.get()); |
145 context->restore(); | 145 context->restore(); |
146 } | 146 } |
147 | 147 |
148 } | 148 } |
OLD | NEW |