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

Unified Diff: ui/views/controls/progress_bar.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
Index: ui/views/controls/progress_bar.cc
diff --git a/ui/views/controls/progress_bar.cc b/ui/views/controls/progress_bar.cc
index 5b7f3a381cc66e0a3a4d2c0c9fb1b6d6452d5bc6..f6d14ab7d48660e0dfc54e2f623149fe79c35ac2 100644
--- a/ui/views/controls/progress_bar.cc
+++ b/ui/views/controls/progress_bar.cc
@@ -10,7 +10,7 @@
#include "base/logging.h"
#include "base/macros.h"
-#include "third_party/skia/include/core/SkPaint.h"
+#include "cc/paint/paint_flags.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
#include "ui/accessibility/ax_node_data.h"
@@ -76,9 +76,9 @@ void ProgressBar::OnPaint(gfx::Canvas* canvas) {
// Draw background.
SkPath background_path;
AddPossiblyRoundRectToPath(content_bounds, &background_path);
- SkPaint background_paint;
- background_paint.setStyle(SkPaint::kFill_Style);
- background_paint.setFlags(SkPaint::kAntiAlias_Flag);
+ cc::PaintFlags background_paint;
+ background_paint.setStyle(cc::PaintFlags::kFill_Style);
+ background_paint.setAntiAlias(true);
background_paint.setColor(GetBackgroundColor());
canvas->DrawPath(background_path, background_paint);
@@ -93,9 +93,9 @@ void ProgressBar::OnPaint(gfx::Canvas* canvas) {
slice_bounds.set_width(slice_width);
AddPossiblyRoundRectToPath(slice_bounds, &slice_path);
- SkPaint slice_paint;
- slice_paint.setStyle(SkPaint::kFill_Style);
- slice_paint.setFlags(SkPaint::kAntiAlias_Flag);
+ cc::PaintFlags slice_paint;
+ slice_paint.setStyle(cc::PaintFlags::kFill_Style);
+ slice_paint.setAntiAlias(true);
slice_paint.setColor(GetForegroundColor());
canvas->DrawPath(slice_path, slice_paint);
}
@@ -151,9 +151,9 @@ void ProgressBar::OnPaintIndeterminate(gfx::Canvas* canvas) {
// Draw background.
SkPath background_path;
AddPossiblyRoundRectToPath(content_bounds, &background_path);
- SkPaint background_paint;
- background_paint.setStyle(SkPaint::kFill_Style);
- background_paint.setFlags(SkPaint::kAntiAlias_Flag);
+ cc::PaintFlags background_paint;
+ background_paint.setStyle(cc::PaintFlags::kFill_Style);
+ background_paint.setAntiAlias(true);
background_paint.setColor(GetBackgroundColor());
canvas->DrawPath(background_path, background_paint);
@@ -199,9 +199,9 @@ void ProgressBar::OnPaintIndeterminate(gfx::Canvas* canvas) {
slice_bounds.set_width(bar2_end_x - bar2_start_x);
AddPossiblyRoundRectToPath(slice_bounds, &slice_path);
- SkPaint slice_paint;
- slice_paint.setStyle(SkPaint::kFill_Style);
- slice_paint.setFlags(SkPaint::kAntiAlias_Flag);
+ cc::PaintFlags slice_paint;
+ slice_paint.setStyle(cc::PaintFlags::kFill_Style);
+ slice_paint.setAntiAlias(true);
slice_paint.setColor(GetForegroundColor());
canvas->DrawPath(slice_path, slice_paint);
}
« no previous file with comments | « ui/views/controls/menu/menu_scroll_view_container.cc ('k') | ui/views/controls/scrollbar/cocoa_scroll_bar.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698