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/PaintInfo.h" | 8 #include "core/layout/PaintInfo.h" |
9 #include "core/layout/svg/LayoutSVGResourceMasker.h" | 9 #include "core/layout/svg/LayoutSVGResourceMasker.h" |
10 #include "core/paint/CompositingRecorder.h" | 10 #include "core/paint/CompositingRecorder.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 EndCompositingDisplayItem endCompositingContent(object->displayItemClien
t()); | 61 EndCompositingDisplayItem endCompositingContent(object->displayItemClien
t()); |
62 endCompositingContent.replay(context); | 62 endCompositingContent.replay(context); |
63 } | 63 } |
64 } | 64 } |
65 | 65 |
66 void SVGMaskPainter::drawMaskForRenderer(GraphicsContext* context, DisplayItemCl
ient client, const FloatRect& targetBoundingBox) | 66 void SVGMaskPainter::drawMaskForRenderer(GraphicsContext* context, DisplayItemCl
ient client, const FloatRect& targetBoundingBox) |
67 { | 67 { |
68 ASSERT(context); | 68 ASSERT(context); |
69 | 69 |
70 AffineTransform contentTransformation; | 70 AffineTransform contentTransformation; |
71 RefPtr<const SkPicture> maskContentPicture = m_mask.getContentPicture(conten
tTransformation, targetBoundingBox); | 71 RefPtr<const SkPicture> maskContentPicture = m_mask.createContentPicture(con
tentTransformation, targetBoundingBox); |
72 | 72 |
73 TransformRecorder recorder(*context, client, contentTransformation); | 73 TransformRecorder recorder(*context, client, contentTransformation); |
74 | 74 |
75 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { | 75 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) { |
76 ASSERT(context->displayItemList()); | 76 ASSERT(context->displayItemList()); |
77 context->displayItemList()->add(DrawingDisplayItem::create(client, Displ
ayItem::SVGMask, maskContentPicture)); | 77 context->displayItemList()->add(DrawingDisplayItem::create(client, Displ
ayItem::SVGMask, maskContentPicture)); |
78 } else { | 78 } else { |
79 DrawingDisplayItem maskPicture(client, DisplayItem::SVGMask, maskContent
Picture); | 79 DrawingDisplayItem maskPicture(client, DisplayItem::SVGMask, maskContent
Picture); |
80 maskPicture.replay(context); | 80 maskPicture.replay(context); |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 } | 84 } |
OLD | NEW |