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

Unified Diff: include/gpu/GrPoint.h

Issue 303263005: Add Sample slide for Rectanizers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: comment change 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/SampleApp.gyp ('k') | samplecode/SampleRectanizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrPoint.h
diff --git a/include/gpu/GrPoint.h b/include/gpu/GrPoint.h
index 7be5736f563b6fe544ab02222e7927dc40dba0c8..16738f52434f9f4fa2dd05235025b244e040b5c8 100644
--- a/include/gpu/GrPoint.h
+++ b/include/gpu/GrPoint.h
@@ -15,14 +15,18 @@
#include "SkScalar.h"
#include "SkPoint.h"
-#if 0
-#define GrPoint SkPoint
-#define GrVec SkVector
-#endif
-
struct GrIPoint16 {
int16_t fX, fY;
+ static GrIPoint16 Make(intptr_t x, intptr_t y) {
+ GrIPoint16 pt;
+ pt.set(x, y);
+ return pt;
+ }
+
+ int16_t x() const { return fX; }
+ int16_t y() const { return fY; }
+
void set(intptr_t x, intptr_t y) {
fX = SkToS16(x);
fY = SkToS16(y);
« no previous file with comments | « gyp/SampleApp.gyp ('k') | samplecode/SampleRectanizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698