Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: ui/views/animation/ink_drop_painted_layer_delegates.cc

Issue 2661353002: ui/gfx: split out code that depends on paint (Closed)
Patch Set: Fix mac, chromeos build Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/views/bubble/bubble_border.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "ui/gfx/canvas.h" 11 #include "ui/gfx/canvas.h"
12 #include "ui/gfx/color_palette.h" 12 #include "ui/gfx/color_palette.h"
13 #include "ui/gfx/geometry/insets.h" 13 #include "ui/gfx/geometry/insets.h"
14 #include "ui/gfx/geometry/point.h" 14 #include "ui/gfx/geometry/point.h"
15 #include "ui/gfx/geometry/point_conversions.h" 15 #include "ui/gfx/geometry/point_conversions.h"
16 #include "ui/gfx/geometry/rect.h" 16 #include "ui/gfx/geometry/rect.h"
17 #include "ui/gfx/geometry/rect_f.h" 17 #include "ui/gfx/geometry/rect_f.h"
18 #include "ui/gfx/skia_paint_util.h"
18 #include "ui/gfx/skia_util.h" 19 #include "ui/gfx/skia_util.h"
19 20
20 namespace views { 21 namespace views {
21 22
22 //////////////////////////////////////////////////////////////////////////////// 23 ////////////////////////////////////////////////////////////////////////////////
23 // 24 //
24 // BasePaintedLayerDelegate 25 // BasePaintedLayerDelegate
25 // 26 //
26 27
27 BasePaintedLayerDelegate::BasePaintedLayerDelegate(SkColor color) 28 BasePaintedLayerDelegate::BasePaintedLayerDelegate(SkColor color)
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 recorder.canvas()->sk_canvas()->drawRRect(r_rect, paint); 167 recorder.canvas()->sk_canvas()->drawRRect(r_rect, paint);
167 168
168 // Now the shadow. 169 // Now the shadow.
169 paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadows_)); 170 paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadows_));
170 recorder.canvas()->sk_canvas()->clipRRect(r_rect, SkClipOp::kDifference, 171 recorder.canvas()->sk_canvas()->clipRRect(r_rect, SkClipOp::kDifference,
171 true); 172 true);
172 recorder.canvas()->sk_canvas()->drawRRect(r_rect, paint); 173 recorder.canvas()->sk_canvas()->drawRRect(r_rect, paint);
173 } 174 }
174 175
175 } // namespace views 176 } // namespace views
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme_mac.mm ('k') | ui/views/bubble/bubble_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698