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

Unified Diff: ui/views/controls/progress_bar.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
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..304b1c10745dfd419ddf4b3054191b115c61db6e 100644
--- a/ui/views/controls/progress_bar.cc
+++ b/ui/views/controls/progress_bar.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/macros.h"
+#include "skia/ext/cdl_paint.h"
#include "third_party/skia/include/core/SkPaint.h"
#include "third_party/skia/include/core/SkPath.h"
#include "third_party/skia/include/effects/SkGradientShader.h"
@@ -76,9 +77,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);
+ CdlPaint background_paint;
+ background_paint.setStyle(CdlPaint::kFill_Style);
+ background_paint.setAntiAlias(true);
background_paint.setColor(GetBackgroundColor());
canvas->DrawPath(background_path, background_paint);
@@ -93,9 +94,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);
+ CdlPaint slice_paint;
+ slice_paint.setStyle(CdlPaint::kFill_Style);
+ slice_paint.setAntiAlias(true);
slice_paint.setColor(GetForegroundColor());
canvas->DrawPath(slice_path, slice_paint);
}
@@ -151,9 +152,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);
+ CdlPaint background_paint;
+ background_paint.setStyle(CdlPaint::kFill_Style);
+ background_paint.setAntiAlias(true);
background_paint.setColor(GetBackgroundColor());
canvas->DrawPath(background_path, background_paint);
@@ -199,9 +200,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);
+ CdlPaint slice_paint;
+ slice_paint.setStyle(CdlPaint::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