aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2014-06-02 10:20:14 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-06-02 10:20:15 -0700
commitd537341e16524d1e22ac5e6c8b9c8f274ba1833c (patch)
treed33b25af48d42a4e9ef93e57ab37b5aca82bbe65 /include
parent78358bf624c7e7c09ffccf638c50870808d884d6 (diff)
Move GrIPoint16 to SkIPoint16 (and remove GrPoint.h)
R=bsalomon@google.com, reed@google.com Author: robertphillips@google.com Review URL: https://codereview.chromium.org/309683002
Diffstat (limited to 'include')
-rw-r--r--include/core/SkPoint.h22
-rw-r--r--include/gpu/GrContext.h1
-rw-r--r--include/gpu/GrGlyph.h2
-rw-r--r--include/gpu/GrPoint.h36
4 files changed, 23 insertions, 38 deletions
diff --git a/include/core/SkPoint.h b/include/core/SkPoint.h
index 5dd331a14c..6f32d98c75 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
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index c54f2e6b23..41ee15917f 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -12,7 +12,6 @@
#include "GrColor.h"
#include "GrPaint.h"
#include "GrPathRendererChain.h"
-#include "GrPoint.h"
#include "GrRenderTarget.h"
#include "GrTexture.h"
#include "SkMatrix.h"
diff --git a/include/gpu/GrGlyph.h b/include/gpu/GrGlyph.h
index 6de0c57d98..a7d834153f 100644
--- a/include/gpu/GrGlyph.h
+++ b/include/gpu/GrGlyph.h
@@ -26,7 +26,7 @@ struct GrGlyph {
SkPath* fPath;
PackedID fPackedID;
GrIRect16 fBounds;
- GrIPoint16 fAtlasLocation;
+ SkIPoint16 fAtlasLocation;
void init(GrGlyph::PackedID packed, const SkIRect& bounds) {
fPlot = NULL;
diff --git a/include/gpu/GrPoint.h b/include/gpu/GrPoint.h
deleted file mode 100644
index 16738f5243..0000000000
--- a/include/gpu/GrPoint.h
+++ /dev/null
@@ -1,36 +0,0 @@
-
-/*
- * Copyright 2010 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-
-#ifndef GrPoint_DEFINED
-#define GrPoint_DEFINED
-
-#include "GrTypes.h"
-#include "SkScalar.h"
-#include "SkPoint.h"
-
-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);
- }
-};
-
-#endif