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

Unified Diff: ui/views/controls/md_slider.cc

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/image_view.cc ('k') | ui/views/controls/menu/menu_scroll_view_container.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/md_slider.cc
diff --git a/ui/views/controls/md_slider.cc b/ui/views/controls/md_slider.cc
index 201450f62bb573a935faa4443fa9a45e4b838d44..7db39db4f1fd04067e5d4bb97e03a0cb51050631 100644
--- a/ui/views/controls/md_slider.cc
+++ b/ui/views/controls/md_slider.cc
@@ -4,6 +4,7 @@
#include "ui/views/controls/md_slider.h"
+#include "skia/ext/cdl_paint.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "ui/gfx/animation/slide_animation.h"
@@ -59,8 +60,8 @@ void MdSlider::OnPaint(gfx::Canvas* canvas) {
// Extra space used to hide slider ends behind the thumb.
const int extra_padding = 1;
- SkPaint slider_paint;
- slider_paint.setFlags(SkPaint::kAntiAlias_Flag);
+ CdlPaint slider_paint;
+ slider_paint.setAntiAlias(true);
slider_paint.setColor(current_thumb_color);
canvas->DrawRoundRect(
gfx::Rect(content.x(), y, full + extra_padding, kLineThickness),
@@ -74,21 +75,21 @@ void MdSlider::OnPaint(gfx::Canvas* canvas) {
// Paint the thumb highlight if it exists.
if (is_active_ && thumb_highlight_radius_ > kThumbRadius) {
- SkPaint highlight;
+ CdlPaint highlight;
SkColor kHighlightColor = SkColorSetA(kActiveColor, kHighlightColorAlpha);
highlight.setColor(kHighlightColor);
- highlight.setFlags(SkPaint::kAntiAlias_Flag);
+ highlight.setAntiAlias(true);
canvas->DrawCircle(thumb_center, thumb_highlight_radius_, highlight);
}
// Paint the thumb of the slider.
- SkPaint paint;
+ CdlPaint paint;
paint.setColor(current_thumb_color);
- paint.setFlags(SkPaint::kAntiAlias_Flag);
+ paint.setAntiAlias(true);
if (!is_active_) {
paint.setStrokeWidth(kThumbStroke);
- paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStyle(CdlPaint::kStroke_Style);
}
canvas->DrawCircle(
thumb_center,
« no previous file with comments | « ui/views/controls/image_view.cc ('k') | ui/views/controls/menu/menu_scroll_view_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698