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

Unified Diff: ui/views/controls/button/toggle_button.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/button/radio_button.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/toggle_button.cc
diff --git a/ui/views/controls/button/toggle_button.cc b/ui/views/controls/button/toggle_button.cc
index c0ad3922bdfed0e0a616576a2aca33d1229a43cf..c4b1e4b8168d8cad7df971516a1814ac0ff8b473 100644
--- a/ui/views/controls/button/toggle_button.cc
+++ b/ui/views/controls/button/toggle_button.cc
@@ -4,6 +4,7 @@
#include "ui/views/controls/button/toggle_button.h"
+#include "skia/ext/cdl_paint.h"
#include "third_party/skia/include/core/SkDrawLooper.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "ui/accessibility/ax_node_data.h"
@@ -76,7 +77,7 @@ class ToggleButton::ThumbView : public InkDropHostView {
ui::NativeTheme::kColorId_LabelEnabledColor),
0x99));
shadows.push_back(shadow.Scale(dsf));
- SkPaint thumb_paint;
+ CdlPaint thumb_paint;
thumb_paint.setLooper(gfx::CreateShadowDrawLooperCorrectBlur(shadows));
thumb_paint.setAntiAlias(true);
const SkColor thumb_on_color = GetNativeTheme()->GetSystemColor(
@@ -195,7 +196,7 @@ void ToggleButton::OnPaint(gfx::Canvas* canvas) {
gfx::RectF track_rect(GetTrackBounds());
track_rect.Scale(dsf);
track_rect = gfx::RectF(gfx::ToEnclosingRect(track_rect));
- SkPaint track_paint;
+ CdlPaint track_paint;
track_paint.setAntiAlias(true);
const double color_ratio = slide_animation_.GetCurrentValue();
track_paint.setColor(color_utils::AlphaBlend(
« no previous file with comments | « ui/views/controls/button/radio_button.cc ('k') | ui/views/controls/combobox/combobox.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698