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

Unified Diff: ui/views/painter.cc

Issue 2680943002: ui: Clean up naming of paint-related identifiers (Closed)
Patch Set: 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 | « ui/views/controls/table/table_view.cc ('k') | ui/views/round_rect_painter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/painter.cc
diff --git a/ui/views/painter.cc b/ui/views/painter.cc
index e6384dbffa9e8b7931c71f11bee3d1329b729dfb..655abd820157e0f6517ba5baf060770d3d032dbc 100644
--- a/ui/views/painter.cc
+++ b/ui/views/painter.cc
@@ -70,17 +70,17 @@ void SolidRoundRectPainter::Paint(gfx::Canvas* canvas, const gfx::Size& size) {
gfx::RectF border_rect_f(gfx::ScaleToEnclosingRect(gfx::Rect(size), scale));
const SkScalar scaled_corner_radius = SkFloatToScalar(radius_ * scale);
- cc::PaintFlags paint;
- paint.setAntiAlias(true);
- paint.setStyle(cc::PaintFlags::kFill_Style);
- paint.setColor(bg_color_);
- canvas->DrawRoundRect(border_rect_f, scaled_corner_radius, paint);
+ cc::PaintFlags flags;
+ flags.setAntiAlias(true);
+ flags.setStyle(cc::PaintFlags::kFill_Style);
+ flags.setColor(bg_color_);
+ canvas->DrawRoundRect(border_rect_f, scaled_corner_radius, flags);
border_rect_f.Inset(gfx::InsetsF(0.5f));
- paint.setStyle(cc::PaintFlags::kStroke_Style);
- paint.setStrokeWidth(1);
- paint.setColor(stroke_color_);
- canvas->DrawRoundRect(border_rect_f, scaled_corner_radius, paint);
+ flags.setStyle(cc::PaintFlags::kStroke_Style);
+ flags.setStrokeWidth(1);
+ flags.setColor(stroke_color_);
+ canvas->DrawRoundRect(border_rect_f, scaled_corner_radius, flags);
}
// DashedFocusPainter ----------------------------------------------------------
@@ -205,7 +205,7 @@ gfx::Size GradientPainter::GetMinimumSize() const {
}
void GradientPainter::Paint(gfx::Canvas* canvas, const gfx::Size& size) {
- cc::PaintFlags paint;
+ cc::PaintFlags flags;
SkPoint p[2];
p[0].iset(0, 0);
if (horizontal_)
@@ -213,13 +213,13 @@ void GradientPainter::Paint(gfx::Canvas* canvas, const gfx::Size& size) {
else
p[1].iset(0, size.height());
- paint.setShader(cc::WrapSkShader(SkGradientShader::MakeLinear(
+ flags.setShader(cc::WrapSkShader(SkGradientShader::MakeLinear(
p, colors_.get(), pos_.get(), count_, SkShader::kClamp_TileMode)));
- paint.setStyle(cc::PaintFlags::kFill_Style);
+ flags.setStyle(cc::PaintFlags::kFill_Style);
canvas->sk_canvas()->drawRectCoords(SkIntToScalar(0), SkIntToScalar(0),
SkIntToScalar(size.width()),
- SkIntToScalar(size.height()), paint);
+ SkIntToScalar(size.height()), flags);
}
// ImagePainter ---------------------------------------------------------------
« no previous file with comments | « ui/views/controls/table/table_view.cc ('k') | ui/views/round_rect_painter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698