| 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 "core/paint/SVGClipPainter.h" | 5 #include "core/paint/SVGClipPainter.h" |
| 6 | 6 |
| 7 #include "core/dom/ElementTraversal.h" | 7 #include "core/dom/ElementTraversal.h" |
| 8 #include "core/layout/svg/LayoutSVGResourceClipper.h" | 8 #include "core/layout/svg/LayoutSVGResourceClipper.h" |
| 9 #include "core/layout/svg/SVGResources.h" | 9 #include "core/layout/svg/SVGResources.h" |
| 10 #include "core/layout/svg/SVGResourcesCache.h" | 10 #include "core/layout/svg/SVGResourcesCache.h" |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 default: | 107 default: |
| 108 ASSERT_NOT_REACHED(); | 108 ASSERT_NOT_REACHED(); |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 | 111 |
| 112 void SVGClipPainter::drawClipMaskContent(GraphicsContext& context, const LayoutO
bject& layoutObject, const FloatRect& targetBoundingBox, const FloatRect& target
PaintInvalidationRect) | 112 void SVGClipPainter::drawClipMaskContent(GraphicsContext& context, const LayoutO
bject& layoutObject, const FloatRect& targetBoundingBox, const FloatRect& target
PaintInvalidationRect) |
| 113 { | 113 { |
| 114 AffineTransform contentTransformation; | 114 AffineTransform contentTransformation; |
| 115 RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPicture(con
tentTransformation, targetBoundingBox, context); | 115 RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPicture(con
tentTransformation, targetBoundingBox, context); |
| 116 | 116 |
| 117 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, layoutO
bject, DisplayItem::SVGClip, LayoutPoint())) | 117 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(context, layoutO
bject, DisplayItem::SVGClip)) |
| 118 return; | 118 return; |
| 119 | 119 |
| 120 LayoutObjectDrawingRecorder drawingRecorder(context, layoutObject, DisplayIt
em::SVGClip, targetPaintInvalidationRect, LayoutPoint()); | 120 LayoutObjectDrawingRecorder drawingRecorder(context, layoutObject, DisplayIt
em::SVGClip, targetPaintInvalidationRect); |
| 121 context.save(); | 121 context.save(); |
| 122 context.concatCTM(contentTransformation); | 122 context.concatCTM(contentTransformation); |
| 123 context.drawPicture(clipContentPicture.get()); | 123 context.drawPicture(clipContentPicture.get()); |
| 124 context.restore(); | 124 context.restore(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 } // namespace blink | 127 } // namespace blink |
| OLD | NEW |