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

Unified Diff: sky/engine/core/painting/CanvasGradient.cpp

Issue 1170963003: Sky: Add a DartConverterEnum and use that for all our enum needs. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: 360 no scope Created 5 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 | « sky/engine/core/painting/CanvasGradient.h ('k') | sky/engine/core/painting/Gradient.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/CanvasGradient.cpp
diff --git a/sky/engine/core/painting/CanvasGradient.cpp b/sky/engine/core/painting/CanvasGradient.cpp
index 5ceaae149883336a51b08da8a9d848fff4b6b101..32d9dfd143f1e4956f9ffb1a9d771df71a8bbe2b 100644
--- a/sky/engine/core/painting/CanvasGradient.cpp
+++ b/sky/engine/core/painting/CanvasGradient.cpp
@@ -14,7 +14,7 @@ PassRefPtr<CanvasGradient> CanvasGradient::create() {
void CanvasGradient::initLinear(const Vector<Point>& end_points,
const Vector<SkColor>& colors,
const Vector<float>& color_stops,
- unsigned tile_mode) {
+ SkShader::TileMode tile_mode) {
ASSERT(end_points.size() == 2);
ASSERT(colors.size() == color_stops.size() || color_stops.data() == nullptr);
ASSERT(tile_mode < SkShader::kTileModeCount);
@@ -25,7 +25,7 @@ void CanvasGradient::initLinear(const Vector<Point>& end_points,
// TODO(mpcomplete): allow setting the TileMode.
SkShader* shader = SkGradientShader::CreateLinear(
sk_end_points, colors.data(), color_stops.data(), colors.size(),
- static_cast<SkShader::TileMode>(tile_mode));
+ tile_mode);
set_shader(adoptRef(shader));
}
@@ -33,13 +33,13 @@ void CanvasGradient::initRadial(const Point& center,
double radius,
const Vector<SkColor>& colors,
const Vector<float>& color_stops,
- unsigned tile_mode) {
+ SkShader::TileMode tile_mode) {
ASSERT(colors.size() == color_stops.size() || color_stops.data() == nullptr);
ASSERT(tile_mode < SkShader::kTileModeCount);
SkShader* shader = SkGradientShader::CreateRadial(
center.sk_point, radius, colors.data(), color_stops.data(), colors.size(),
- static_cast<SkShader::TileMode>(tile_mode));
+ tile_mode);
set_shader(adoptRef(shader));
}
« no previous file with comments | « sky/engine/core/painting/CanvasGradient.h ('k') | sky/engine/core/painting/Gradient.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698