| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 default: | 118 default: |
| 119 ASSERT_NOT_REACHED(); | 119 ASSERT_NOT_REACHED(); |
| 120 } | 120 } |
| 121 } | 121 } |
| 122 | 122 |
| 123 void SVGClipPainter::drawClipMaskContent(GraphicsContext* context, const LayoutO
bject& layoutObject, const FloatRect& targetBoundingBox) | 123 void SVGClipPainter::drawClipMaskContent(GraphicsContext* context, const LayoutO
bject& layoutObject, const FloatRect& targetBoundingBox) |
| 124 { | 124 { |
| 125 ASSERT(context); | 125 ASSERT(context); |
| 126 | 126 |
| 127 AffineTransform contentTransformation; | 127 AffineTransform contentTransformation; |
| 128 RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPicture(con
tentTransformation, targetBoundingBox); | 128 RefPtr<const SkPicture> clipContentPicture = m_clip.createContentPicture(con
tentTransformation, targetBoundingBox, context); |
| 129 | 129 |
| 130 TransformRecorder recorder(*context, layoutObject, contentTransformation); | 130 TransformRecorder recorder(*context, layoutObject, contentTransformation); |
| 131 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { | 131 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
| 132 ASSERT(context->displayItemList()); | 132 ASSERT(context->displayItemList()); |
| 133 if (context->displayItemList()->displayItemConstructionIsDisabled()) | 133 if (context->displayItemList()->displayItemConstructionIsDisabled()) |
| 134 return; | 134 return; |
| 135 context->displayItemList()->add(DrawingDisplayItem::create(layoutObject,
DisplayItem::SVGClip, clipContentPicture)); | 135 context->displayItemList()->add(DrawingDisplayItem::create(layoutObject,
DisplayItem::SVGClip, clipContentPicture)); |
| 136 } else { | 136 } else { |
| 137 DrawingDisplayItem clipPicture(layoutObject, DisplayItem::SVGClip, clipC
ontentPicture); | 137 DrawingDisplayItem clipPicture(layoutObject, DisplayItem::SVGClip, clipC
ontentPicture); |
| 138 clipPicture.replay(*context); | 138 clipPicture.replay(*context); |
| 139 } | 139 } |
| 140 } | 140 } |
| 141 | 141 |
| 142 } | 142 } |
| OLD | NEW |