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

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

Issue 1152963009: Add support for linear gradients, implemented as skia shaders. (Closed) Base URL: git@github.com:/domokit/mojo.git@master
Patch Set: . 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/Point.h ('k') | sky/engine/core/painting/Shader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/painting/Point.cpp
diff --git a/sky/engine/core/painting/Point.cpp b/sky/engine/core/painting/Point.cpp
index 6df54fe7e97b2a0d9c4fdc42791a749f9b153222..e7e29c62d82ba315fac8ecb061a7890418147ac8 100644
--- a/sky/engine/core/painting/Point.cpp
+++ b/sky/engine/core/painting/Point.cpp
@@ -11,21 +11,17 @@
namespace blink {
-// Convert dartPoint.x,y ==> SkPoint.
-Point DartConverter<Point>::FromArgumentsWithNullCheck(
- Dart_NativeArguments args,
- int index,
- Dart_Handle& exception) {
+// Convert handle.x,y ==> SkPoint.
+Point DartConverter<Point>::FromDart(Dart_Handle handle) {
Point result;
result.is_null = true;
- Dart_Handle dartPoint = Dart_GetNativeArgument(args, index);
- DCHECK(!LogIfError(dartPoint));
+ DCHECK(!LogIfError(handle));
Dart_Handle x_value =
- Dart_GetField(dartPoint, DOMDartState::Current()->x_handle());
+ Dart_GetField(handle, DOMDartState::Current()->x_handle());
Dart_Handle y_value =
- Dart_GetField(dartPoint, DOMDartState::Current()->y_handle());
+ Dart_GetField(handle, DOMDartState::Current()->y_handle());
double x = 0.0, y = 0.0;
Dart_Handle err = Dart_DoubleValue(x_value, &x);
@@ -37,4 +33,11 @@ Point DartConverter<Point>::FromArgumentsWithNullCheck(
return result;
}
+Point DartConverter<Point>::FromArgumentsWithNullCheck(
+ Dart_NativeArguments args,
+ int index,
+ Dart_Handle& exception) {
+ return FromDart(Dart_GetNativeArgument(args, index));
+}
+
} // namespace blink
« no previous file with comments | « sky/engine/core/painting/Point.h ('k') | sky/engine/core/painting/Shader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698