OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/ClipPathClipper.h" | 5 #include "core/paint/ClipPathClipper.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/SVGLayoutSupport.h" | 9 #include "core/layout/svg/SVGLayoutSupport.h" |
10 #include "core/layout/svg/SVGResources.h" | 10 #include "core/layout/svg/SVGResources.h" |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 target_bounding_box.Y()); | 204 target_bounding_box.Y()); |
205 content_transform.ScaleNonUniform(target_bounding_box.Width(), | 205 content_transform.ScaleNonUniform(target_bounding_box.Width(), |
206 target_bounding_box.Height()); | 206 target_bounding_box.Height()); |
207 } | 207 } |
208 SubtreeContentTransformScope content_transform_scope(content_transform); | 208 SubtreeContentTransformScope content_transform_scope(content_transform); |
209 | 209 |
210 TransformRecorder content_transform_recorder(mask_context, layout_object_, | 210 TransformRecorder content_transform_recorder(mask_context, layout_object_, |
211 content_transform); | 211 content_transform); |
212 mask_context.GetPaintController().CreateAndAppend<DrawingDisplayItem>( | 212 mask_context.GetPaintController().CreateAndAppend<DrawingDisplayItem>( |
213 layout_object_, DisplayItem::kSVGClip, | 213 layout_object_, DisplayItem::kSVGClip, |
214 resource_clipper_->CreatePaintRecord()); | 214 resource_clipper_->CreatePaintRecord(), target_bounding_box); |
215 } | 215 } |
216 } | 216 } |
217 | 217 |
218 LayoutObjectDrawingRecorder drawing_recorder( | 218 LayoutObjectDrawingRecorder drawing_recorder( |
219 context_, layout_object_, DisplayItem::kSVGClip, target_visual_rect); | 219 context_, layout_object_, DisplayItem::kSVGClip, target_visual_rect); |
220 context_.DrawRecord(mask_builder.EndRecording()); | 220 context_.DrawRecord(mask_builder.EndRecording()); |
221 return true; | 221 return true; |
222 } | 222 } |
223 | 223 |
224 void ClipPathClipper::FinishEffect() { | 224 void ClipPathClipper::FinishEffect() { |
(...skipping 11 matching lines...) Expand all Loading... |
236 // Transfer clip mask -> bg (SrcOver) | 236 // Transfer clip mask -> bg (SrcOver) |
237 mask_clip_recorder_.reset(); | 237 mask_clip_recorder_.reset(); |
238 break; | 238 break; |
239 case ClipperState::kNotApplied: | 239 case ClipperState::kNotApplied: |
240 NOTREACHED(); | 240 NOTREACHED(); |
241 break; | 241 break; |
242 } | 242 } |
243 } | 243 } |
244 | 244 |
245 } // namespace blink | 245 } // namespace blink |
OLD | NEW |