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

Unified Diff: chrome/browser/chromeos/ui/accessibility_focus_ring_layer.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
Index: chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc
diff --git a/chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc b/chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc
index 52e9b695d2eb11fd80b2ca68fd6304e928a32d0c..28ef7322eb16d65212baa5e89c047f15f34c78dd 100644
--- a/chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc
+++ b/chrome/browser/chromeos/ui/accessibility_focus_ring_layer.cc
@@ -114,21 +114,20 @@ void AccessibilityFocusRingLayer::OnPaintLayer(
const ui::PaintContext& context) {
ui::PaintRecorder recorder(context, layer()->size());
- SkPaint paint;
- paint.setFlags(SkPaint::kAntiAlias_Flag);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(2);
+ cc::PaintFlags flags;
+ flags.setAntiAlias(true);
+ flags.setStyle(cc::PaintFlags::kStroke_Style);
+ flags.setStrokeWidth(2);
SkPath path;
gfx::Vector2d offset = layer()->bounds().OffsetFromOrigin();
const int w = kGradientWidth;
for (int i = 0; i < w; ++i) {
- paint.setColor(
- SkColorSetARGBMacro(
- 255 * (w - i) * (w - i) / (w * w),
- kFocusRingColorRed, kFocusRingColorGreen, kFocusRingColorBlue));
+ flags.setColor(SkColorSetARGBMacro(255 * (w - i) * (w - i) / (w * w),
+ kFocusRingColorRed, kFocusRingColorGreen,
+ kFocusRingColorBlue));
path = MakePath(ring_, i, offset);
- recorder.canvas()->DrawPath(path, paint);
+ recorder.canvas()->DrawPath(path, flags);
}
}
« no previous file with comments | « chrome/browser/chromeos/ui/accessibility_cursor_ring_layer.cc ('k') | chrome/browser/chromeos/ui/focus_ring_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698