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

Unified Diff: Source/platform/graphics/GraphicsContext.cpp

Issue 446543002: Removing WindRule.h completely (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated according to comments Created 6 years, 4 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 | « Source/platform/geometry/FloatPolygon.h ('k') | Source/platform/graphics/GraphicsTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/graphics/GraphicsContext.cpp
diff --git a/Source/platform/graphics/GraphicsContext.cpp b/Source/platform/graphics/GraphicsContext.cpp
index 902e2b7c02c572b40fb3acff3692427265453676..73e3d5e6ebe26a0ee8295f050630b59c985721bd 100644
--- a/Source/platform/graphics/GraphicsContext.cpp
+++ b/Source/platform/graphics/GraphicsContext.cpp
@@ -1273,8 +1273,7 @@ void GraphicsContext::fillPath(const Path& pathToFill)
SkPath& path = const_cast<SkPath&>(pathToFill.skPath());
SkPath::FillType previousFillType = path.getFillType();
- SkPath::FillType temporaryFillType =
- immutableState()->fillRule() == RULE_EVENODD ? SkPath::kEvenOdd_FillType : SkPath::kWinding_FillType;
+ SkPath::FillType temporaryFillType = static_cast<SkPath::FillType>(immutableState()->fillRule());
path.setFillType(temporaryFillType);
drawPath(path, immutableState()->fillPaint());
@@ -1465,7 +1464,7 @@ void GraphicsContext::clipPath(const Path& pathToClip, WindRule clipRule)
SkPath& path = const_cast<SkPath&>(pathToClip.skPath());
SkPath::FillType previousFillType = path.getFillType();
- SkPath::FillType temporaryFillType = clipRule == RULE_EVENODD ? SkPath::kEvenOdd_FillType : SkPath::kWinding_FillType;
+ SkPath::FillType temporaryFillType = static_cast<SkPath::FillType>(clipRule);
path.setFillType(temporaryFillType);
clipPath(path, AntiAliased);
@@ -1502,7 +1501,7 @@ void GraphicsContext::canvasClip(const Path& pathToClip, WindRule clipRule)
SkPath& path = const_cast<SkPath&>(pathToClip.skPath());
SkPath::FillType previousFillType = path.getFillType();
- SkPath::FillType temporaryFillType = clipRule == RULE_EVENODD ? SkPath::kEvenOdd_FillType : SkPath::kWinding_FillType;
+ SkPath::FillType temporaryFillType = static_cast<SkPath::FillType>(clipRule);
path.setFillType(temporaryFillType);
clipPath(path);
« no previous file with comments | « Source/platform/geometry/FloatPolygon.h ('k') | Source/platform/graphics/GraphicsTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698