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

Unified Diff: chrome/browser/chromeos/ui/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/focus_ring_layer.cc
diff --git a/chrome/browser/chromeos/ui/focus_ring_layer.cc b/chrome/browser/chromeos/ui/focus_ring_layer.cc
index 39de53d43e68101f9e7daac3099b16e9dc19f166..f988578bc2182556391068b0a2aa3df748e5b287 100644
--- a/chrome/browser/chromeos/ui/focus_ring_layer.cc
+++ b/chrome/browser/chromeos/ui/focus_ring_layer.cc
@@ -90,20 +90,20 @@ void FocusRingLayer::OnPaintLayer(const ui::PaintContext& context) {
ui::PaintRecorder recorder(context, layer_->size());
- SkPaint paint;
- paint.setColor(kShadowColor);
- paint.setFlags(SkPaint::kAntiAlias_Flag);
- paint.setStyle(SkPaint::kStroke_Style);
- paint.setStrokeWidth(2);
+ cc::PaintFlags flags;
+ flags.setAntiAlias(true);
+ flags.setColor(kShadowColor);
+ flags.setStyle(cc::PaintFlags::kStroke_Style);
+ flags.setStrokeWidth(2);
gfx::Rect bounds = focus_ring_ - layer_->bounds().OffsetFromOrigin();
int r = kShadowRadius;
for (int i = 0; i < r; i++) {
// Fade out alpha quadratically.
- paint.setAlpha((kShadowAlpha * (r - i) * (r - i)) / (r * r));
+ flags.setAlpha((kShadowAlpha * (r - i) * (r - i)) / (r * r));
gfx::Rect outsetRect = bounds;
outsetRect.Inset(-i, -i, -i, -i);
- recorder.canvas()->DrawRect(outsetRect, paint);
+ recorder.canvas()->DrawRect(outsetRect, flags);
}
}

Powered by Google App Engine
This is Rietveld 408576698