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

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

Issue 2575533002: SkClipOp is an enum class now (Closed)
Patch Set: Created 4 years 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/gfx/image/image_skia_operations.cc ('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"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ui/gfx/image/image_skia_operations.cc ('k') | ui/views/bubble/bubble_border.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698