| 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 "ui/views/animation/ink_drop_painted_layer_delegates.h" | 5 #include "ui/views/animation/ink_drop_painted_layer_delegates.h" |
| 6 | 6 |
| 7 #include "third_party/skia/include/core/SkDrawLooper.h" | 7 #include "third_party/skia/include/core/SkDrawLooper.h" |
| 8 #include "third_party/skia/include/core/SkPaint.h" | 8 #include "third_party/skia/include/core/SkPaint.h" |
| 9 #include "third_party/skia/include/core/SkRRect.h" | 9 #include "third_party/skia/include/core/SkRRect.h" |
| 10 #include "ui/compositor/paint_recorder.h" | 10 #include "ui/compositor/paint_recorder.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 gfx::RectF(bounds_ - GetPaintedBounds().OffsetFromOrigin()); | 160 gfx::RectF(bounds_ - GetPaintedBounds().OffsetFromOrigin()); |
| 161 SkRRect r_rect = SkRRect::MakeRectXY(gfx::RectFToSkRect(rrect_bounds), | 161 SkRRect r_rect = SkRRect::MakeRectXY(gfx::RectFToSkRect(rrect_bounds), |
| 162 corner_radius_, corner_radius_); | 162 corner_radius_, corner_radius_); |
| 163 | 163 |
| 164 // First the fill color. | 164 // First the fill color. |
| 165 ui::PaintRecorder recorder(context, GetPaintedBounds().size()); | 165 ui::PaintRecorder recorder(context, GetPaintedBounds().size()); |
| 166 recorder.canvas()->sk_canvas()->drawRRect(r_rect, paint); | 166 recorder.canvas()->sk_canvas()->drawRRect(r_rect, paint); |
| 167 | 167 |
| 168 // Now the shadow. | 168 // Now the shadow. |
| 169 paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadows_)); | 169 paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadows_)); |
| 170 recorder.canvas()->sk_canvas()->clipRRect(r_rect, kDifference_SkClipOp, true); | 170 recorder.canvas()->sk_canvas()->clipRRect(r_rect, SkClipOp::kDifference, |
| 171 true); |
| 171 recorder.canvas()->sk_canvas()->drawRRect(r_rect, paint); | 172 recorder.canvas()->sk_canvas()->drawRRect(r_rect, paint); |
| 172 } | 173 } |
| 173 | 174 |
| 174 } // namespace views | 175 } // namespace views |
| OLD | NEW |