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

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

Issue 1214833004: Split Size into Size and Offset. (Closed) Base URL: https://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/OffsetBase.dart ('k') | sky/engine/core/painting/Point.dart » ('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 e3baafff70d99efae2cdeab9ef87e231152b2a69..0c9a882b6572d9171e81d443cf7b0b0a6c97f6fc 100644
--- a/sky/engine/core/painting/Point.cpp
+++ b/sky/engine/core/painting/Point.cpp
@@ -12,21 +12,18 @@ namespace blink {
// Convert handle.x,y ==> SkPoint.
Point DartConverter<Point>::FromDart(Dart_Handle handle) {
- Point result;
- result.is_null = true;
-
DCHECK(!LogIfError(handle));
-
Dart_Handle x_value =
Dart_GetField(handle, DOMDartState::Current()->x_handle());
Dart_Handle y_value =
Dart_GetField(handle, DOMDartState::Current()->y_handle());
-
double x = 0.0, y = 0.0;
Dart_Handle err = Dart_DoubleValue(x_value, &x);
DCHECK(!LogIfError(err));
err = Dart_DoubleValue(y_value, &y);
DCHECK(!LogIfError(err));
+
+ Point result;
result.sk_point.set(x, y);
result.is_null = false;
return result;
« no previous file with comments | « sky/engine/core/painting/OffsetBase.dart ('k') | sky/engine/core/painting/Point.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698