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

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

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 11 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 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 acb97d75f6f645ae0431d0396a7b0be9079e8766..8e1870c53e90b34b562ec1fdc1d6ec03242be057 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 "cc/paint/paint_flags.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);
+ cc::PaintFlags slider_paint;
+ slider_paint.setAntiAlias(true);
slider_paint.setColor(current_thumb_color);
canvas->DrawRoundRect(
gfx::Rect(content.x(), y, full + extra_padding, kLineThickness),
@@ -76,21 +77,21 @@ void MdSlider::OnPaint(gfx::Canvas* canvas) {
const int thumb_highlight_radius =
HasFocus() ? kThumbHighlightRadius : thumb_highlight_radius_;
if (is_active_ && thumb_highlight_radius > kThumbRadius) {
- SkPaint highlight;
+ cc::PaintFlags highlight;
SkColor kHighlightColor = SkColorSetA(kActiveColor, kHighlightColorAlpha);
highlight.setColor(kHighlightColor);
- highlight.setFlags(SkPaint::kAntiAlias_Flag);
+ highlight.setFlags(cc::PaintFlags::kAntiAlias_Flag);
canvas->DrawCircle(thumb_center, thumb_highlight_radius, highlight);
}
// Paint the thumb of the slider.
- SkPaint paint;
+ cc::PaintFlags paint;
paint.setColor(current_thumb_color);
- paint.setFlags(SkPaint::kAntiAlias_Flag);
+ paint.setFlags(cc::PaintFlags::kAntiAlias_Flag);
if (!is_active_) {
paint.setStrokeWidth(kThumbStroke);
- paint.setStyle(SkPaint::kStroke_Style);
+ paint.setStyle(cc::PaintFlags::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