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

Unified Diff: include/core/SkPoint.h

Issue 309683002: Move GrIPoint16 to SkIPoint16 (and remove GrPoint.h) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Update to ToT Created 6 years, 7 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 | « gyp/public_headers.gypi ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPoint.h
diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h
index 5dd331a14ca9b65ecef9d1fec10594ff01d565c0..13140b4c49fe36013ac13f040063dd3ea0743012 100644
--- a/include/core/SkPoint.h
+++ b/include/core/SkPoint.h
@@ -11,6 +11,28 @@
#include "SkMath.h"
#include "SkScalar.h"
+/** \struct SkIPoint16
+
+ SkIPoint holds two 16 bit integer coordinates
+*/
+struct SkIPoint16 {
+ int16_t fX, fY;
+
+ static SkIPoint16 Make(int x, int y) {
+ SkIPoint16 pt;
+ pt.set(x, y);
+ return pt;
+ }
+
+ int16_t x() const { return fX; }
+ int16_t y() const { return fY; }
+
+ void set(int x, int y) {
+ fX = SkToS16(x);
+ fY = SkToS16(y);
+ }
+};
+
/** \struct SkIPoint
SkIPoint holds two 32 bit integer coordinates
« no previous file with comments | « gyp/public_headers.gypi ('k') | include/gpu/GrContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698