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

Unified Diff: chrome/browser/profiles/profile_avatar_icon_util.cc

Issue 2697663002: Clean up naming of paint-related identifiers (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/profiles/profile_avatar_icon_util.cc
diff --git a/chrome/browser/profiles/profile_avatar_icon_util.cc b/chrome/browser/profiles/profile_avatar_icon_util.cc
index 01bb8b199493f694f81483fddb853ef42ddc4156..dcbf5068e12f6bcf6689181c5e82a9bc3d344fb8 100644
--- a/chrome/browser/profiles/profile_avatar_icon_util.cc
+++ b/chrome/browser/profiles/profile_avatar_icon_util.cc
@@ -189,21 +189,21 @@ void AvatarImageSource::Draw(gfx::Canvas* canvas) {
SkFloatToScalar(x + border_size - 0.5f), // right
SkFloatToScalar(y + border_size - 0.5f)); // bottom
- cc::PaintFlags paint;
- paint.setColor(border_color);
- paint.setStyle(cc::PaintFlags::kStroke_Style);
- paint.setStrokeWidth(SkIntToScalar(1));
+ cc::PaintFlags flags;
+ flags.setColor(border_color);
+ flags.setStyle(cc::PaintFlags::kStroke_Style);
+ flags.setStrokeWidth(SkIntToScalar(1));
- canvas->DrawPath(path, paint);
+ canvas->DrawPath(path, flags);
} else if (border_ == BORDER_ETCHED) {
// Give the avatar an etched look by drawing a highlight on the bottom and
// right edges.
SkColor shadow_color = SkColorSetARGB(83, 0, 0, 0);
SkColor highlight_color = SkColorSetARGB(96, 255, 255, 255);
- cc::PaintFlags paint;
- paint.setStyle(cc::PaintFlags::kStroke_Style);
- paint.setStrokeWidth(SkIntToScalar(1));
+ cc::PaintFlags flags;
+ flags.setStyle(cc::PaintFlags::kStroke_Style);
+ flags.setStrokeWidth(SkIntToScalar(1));
SkPath path;
@@ -218,8 +218,8 @@ void AvatarImageSource::Draw(gfx::Canvas* canvas) {
// Draw right to the top-right, stopping within the last pixel.
path.rLineTo(SkFloatToScalar(width_ - 0.5f), SkIntToScalar(0));
- paint.setColor(shadow_color);
- canvas->DrawPath(path, paint);
+ flags.setColor(shadow_color);
+ canvas->DrawPath(path, flags);
path.reset();
@@ -233,8 +233,8 @@ void AvatarImageSource::Draw(gfx::Canvas* canvas) {
// Draw up to the top-right.
path.rLineTo(SkIntToScalar(0), SkFloatToScalar(-height_ + 1.5f));
- paint.setColor(highlight_color);
- canvas->DrawPath(path, paint);
+ flags.setColor(highlight_color);
+ canvas->DrawPath(path, flags);
}
}
« no previous file with comments | « chrome/browser/extensions/bookmark_app_helper.cc ('k') | chrome/browser/ui/extensions/icon_with_badge_image_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698