Chromium Code Reviews| Index: ui/views/view.cc |
| diff --git a/ui/views/view.cc b/ui/views/view.cc |
| index 3580d046a375bf6b231976a4ef91827425f6302c..755f964541fec15be94ee98640deb0859d87fa61 100644 |
| --- a/ui/views/view.cc |
| +++ b/ui/views/view.cc |
| @@ -808,12 +808,11 @@ void View::Paint(const ui::PaintContext& parent_context) { |
| // position we pass to ClipRect takes into consideration whether or not the |
| // View uses a right-to-left layout so that we paint the View in its |
| // mirrored position if need be. |
| - gfx::Rect clip_rect_in_parent = bounds(); |
| - clip_rect_in_parent.Inset(clip_insets_); |
| - if (parent_) |
| - clip_rect_in_parent.set_x( |
| - parent_->GetMirroredXForRect(clip_rect_in_parent)); |
| - clip_recorder.ClipRect(clip_rect_in_parent); |
| + gfx::Path clip_path_in_parent = clip_path_; |
| + if (clip_path_in_parent.isEmpty()) |
| + clip_path_in_parent.addRect(gfx::RectToSkRect(GetLocalBounds())); |
| + clip_path_in_parent.offset(GetMirroredX(), y()); |
| + clip_recorder.ClipPathWithAntiAliasing(clip_path_in_parent); |
|
tapted
2016/03/22 07:38:04
I don't have a sense for how computationally expen
Evan Stade
2016/03/22 17:59:58
I was hoping it would be smart, i.e. if the path i
|
| } |
| ui::TransformRecorder transform_recorder(context); |