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

Unified Diff: ui/views/color_chooser/color_chooser_view.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/bubble/tray_bubble_view.cc ('k') | ui/views/controls/button/checkbox.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/color_chooser/color_chooser_view.cc
diff --git a/ui/views/color_chooser/color_chooser_view.cc b/ui/views/color_chooser/color_chooser_view.cc
index b11734be05015cc16bc0dae248bcbc2be09dc46b..a98be0e2b63d354871a386d4b1991a96470e647c 100644
--- a/ui/views/color_chooser/color_chooser_view.cc
+++ b/ui/views/color_chooser/color_chooser_view.cc
@@ -11,7 +11,8 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
-#include "third_party/skia/include/core/SkPaint.h"
+#include "cc/paint/paint_flags.h"
+#include "cc/paint/paint_shader.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/events/event.h"
@@ -102,9 +103,9 @@ void DrawGradientRect(const gfx::Rect& rect, SkColor start_color,
points[1].iset(rect.width() + 1, 0);
else
points[1].iset(0, rect.height() + 1);
- SkPaint paint;
- paint.setShader(SkGradientShader::MakeLinear(points, colors, NULL, 2,
- SkShader::kClamp_TileMode));
+ cc::PaintFlags paint;
+ paint.setShader(cc::WrapSkShader(SkGradientShader::MakeLinear(
+ points, colors, NULL, 2, SkShader::kClamp_TileMode)));
canvas->DrawRect(rect, paint);
}
@@ -210,9 +211,9 @@ void ColorChooserView::HueView::OnPaint(gfx::Canvas* canvas) {
SkIntToScalar(width()) - SK_ScalarHalf,
SkIntToScalar(level_ - kHueIndicatorSize));
- SkPaint indicator_paint;
+ cc::PaintFlags indicator_paint;
indicator_paint.setColor(SK_ColorBLACK);
- indicator_paint.setStyle(SkPaint::kFill_Style);
+ indicator_paint.setStyle(cc::PaintFlags::kFill_Style);
canvas->DrawPath(left_indicator_path, indicator_paint);
canvas->DrawPath(right_indicator_path, indicator_paint);
}
« no previous file with comments | « ui/views/bubble/tray_bubble_view.cc ('k') | ui/views/controls/button/checkbox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698