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

Unified Diff: ash/common/system/chromeos/network/network_icon.cc

Issue 2717943002: Fix cc/paint skia type mismatches (Closed)
Patch Set: Rebase Created 3 years, 10 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 | « ash/common/shelf/shelf_button.cc ('k') | ash/common/system/tray/tray_background_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/chromeos/network/network_icon.cc
diff --git a/ash/common/system/chromeos/network/network_icon.cc b/ash/common/system/chromeos/network/network_icon.cc
index 855e60abc01dd3a1f8872cf7ea2a323639654bc7..08e9b0807fe3adc0f7aba3f954126e0e30800ae3 100644
--- a/ash/common/system/chromeos/network/network_icon.cc
+++ b/ash/common/system/chromeos/network/network_icon.cc
@@ -309,18 +309,18 @@ class SignalStrengthImageSource : public gfx::CanvasImageSource {
const SkScalar kStartAngle = 180.f + kAngleAboveHorizontal;
const SkScalar kSweepAngle = 180.f - 2 * kAngleAboveHorizontal;
- SkPaint paint;
- paint.setAntiAlias(true);
- paint.setStyle(SkPaint::kFill_Style);
+ cc::PaintFlags flags;
+ flags.setAntiAlias(true);
+ flags.setStyle(cc::PaintFlags::kFill_Style);
// Background. Skip drawing for full signal.
if (signal_strength_ != kNumNetworkImages - 1) {
- paint.setColor(SkColorSetA(color_, kBgAlpha));
+ flags.setColor(SkColorSetA(color_, kBgAlpha));
canvas->sk_canvas()->drawArc(gfx::RectFToSkRect(oval_bounds), kStartAngle,
- kSweepAngle, true, paint);
+ kSweepAngle, true, flags);
}
// Foreground (signal strength).
if (signal_strength_ != 0) {
- paint.setColor(color_);
+ flags.setColor(color_);
// Percent of the height of the background wedge that we draw the
// foreground wedge, indexed by signal strength.
static const float kWedgeHeightPercentages[] = {0.f, 0.375f, 0.5833f,
@@ -329,7 +329,7 @@ class SignalStrengthImageSource : public gfx::CanvasImageSource {
oval_bounds.Inset(
gfx::InsetsF((oval_bounds.height() / 2) * (1.f - wedge_percent)));
canvas->sk_canvas()->drawArc(gfx::RectFToSkRect(oval_bounds), kStartAngle,
- kSweepAngle, true, paint);
+ kSweepAngle, true, flags);
}
}
« no previous file with comments | « ash/common/shelf/shelf_button.cc ('k') | ash/common/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698