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

Unified Diff: ui/gfx/paint_vector_icon.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/gfx/paint_throbber.cc ('k') | ui/gfx/render_text.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/paint_vector_icon.cc
diff --git a/ui/gfx/paint_vector_icon.cc b/ui/gfx/paint_vector_icon.cc
index 3a9fdd4a96729122cc84596d0d568fe1cc3f4be3..7d1601dc4c0c363e3d483382a22553a3292635b0 100644
--- a/ui/gfx/paint_vector_icon.cc
+++ b/ui/gfx/paint_vector_icon.cc
@@ -90,7 +90,7 @@ void PaintPath(Canvas* canvas,
int canvas_size = kReferenceSizeDip;
std::vector<SkPath> paths;
- std::vector<cc::PaintFlags> paints;
+ std::vector<cc::PaintFlags> flags_array;
SkRect clip_rect = SkRect::MakeEmpty();
bool flips_in_rtl = false;
CommandType previous_command_type = NEW_PATH;
@@ -100,14 +100,14 @@ void PaintPath(Canvas* canvas,
paths.push_back(SkPath());
paths.back().setFillType(SkPath::kEvenOdd_FillType);
- paints.push_back(cc::PaintFlags());
- paints.back().setColor(color);
- paints.back().setAntiAlias(true);
- paints.back().setStrokeCap(cc::PaintFlags::kRound_Cap);
+ flags_array.push_back(cc::PaintFlags());
+ flags_array.back().setColor(color);
+ flags_array.back().setAntiAlias(true);
+ flags_array.back().setStrokeCap(cc::PaintFlags::kRound_Cap);
}
SkPath& path = paths.back();
- cc::PaintFlags& paint = paints.back();
+ cc::PaintFlags& flags = flags_array.back();
CommandType command_type = path_elements[i].type;
switch (command_type) {
// Handled above.
@@ -119,24 +119,24 @@ void PaintPath(Canvas* canvas,
int r = SkScalarFloorToInt(path_elements[++i].arg);
int g = SkScalarFloorToInt(path_elements[++i].arg);
int b = SkScalarFloorToInt(path_elements[++i].arg);
- paint.setColor(SkColorSetARGB(a, r, g, b));
+ flags.setColor(SkColorSetARGB(a, r, g, b));
break;
}
case PATH_MODE_CLEAR: {
- paint.setBlendMode(SkBlendMode::kClear);
+ flags.setBlendMode(SkBlendMode::kClear);
break;
};
case STROKE: {
- paint.setStyle(cc::PaintFlags::kStroke_Style);
+ flags.setStyle(cc::PaintFlags::kStroke_Style);
SkScalar width = path_elements[++i].arg;
- paint.setStrokeWidth(width);
+ flags.setStrokeWidth(width);
break;
}
case CAP_SQUARE: {
- paint.setStrokeCap(cc::PaintFlags::kSquare_Cap);
+ flags.setStrokeCap(cc::PaintFlags::kSquare_Cap);
break;
}
@@ -310,7 +310,7 @@ void PaintPath(Canvas* canvas,
}
case DISABLE_AA: {
- paint.setAntiAlias(false);
+ flags.setAntiAlias(false);
break;
}
@@ -338,9 +338,9 @@ void PaintPath(Canvas* canvas,
if (!clip_rect.isEmpty())
canvas->sk_canvas()->clipRect(clip_rect);
- DCHECK_EQ(paints.size(), paths.size());
+ DCHECK_EQ(flags_array.size(), paths.size());
for (size_t i = 0; i < paths.size(); ++i)
- canvas->DrawPath(paths[i], paints[i]);
+ canvas->DrawPath(paths[i], flags_array[i]);
}
class VectorIconSource : public CanvasImageSource {
« no previous file with comments | « ui/gfx/paint_throbber.cc ('k') | ui/gfx/render_text.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698