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

Unified Diff: ui/gfx/paint_vector_icon.cc

Issue 2075863002: Fix check for ARC_TO vs R_ARC_TO for vector assets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | 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 52c1e9a9f50936ef6a500080a97b6d70a4138df2..c6a2620d71cffbd05579324234772f50aeae9d68 100644
--- a/ui/gfx/paint_vector_icon.cc
+++ b/ui/gfx/paint_vector_icon.cc
@@ -102,7 +102,8 @@ void PaintPath(Canvas* canvas,
SkPath& path = paths.back();
SkPaint& paint = paints.back();
- switch (path_elements[i].type) {
+ CommandType command_type = path_elements[i].type;
+ switch (command_type) {
// Handled above.
case NEW_PATH:
continue;
@@ -158,7 +159,7 @@ void PaintPath(Canvas* canvas,
SkScalar y = path_elements[++i].arg;
auto path_fn =
- path_elements[i].type == ARC_TO
+ command_type == ARC_TO
? static_cast<void (SkPath::*)(
SkScalar, SkScalar, SkScalar, SkPath::ArcSize,
SkPath::Direction, SkScalar, SkScalar)>(&SkPath::arcTo)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698