aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-09 01:01:38 +0000
committerGravatar mike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-08-09 01:01:38 +0000
commit22f84008b3149fa4ccb8cd3070e223ff6193fea4 (patch)
treef2c857cd5a9ada9392ef4e2371890ba7b552ae8c /include/core
parentefb65de8ab9f62244659a0e7792db98bef9a01b0 (diff)
privatization of SkPerspIter.h
remove obsolete SkRelay.h git-svn-id: http://skia.googlecode.com/svn/trunk@5025 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkPerspIter.h48
-rw-r--r--include/core/SkRelay.h43
2 files changed, 0 insertions, 91 deletions
diff --git a/include/core/SkPerspIter.h b/include/core/SkPerspIter.h
deleted file mode 100644
index 7f6add289c..0000000000
--- a/include/core/SkPerspIter.h
+++ /dev/null
@@ -1,48 +0,0 @@
-
-/*
- * Copyright 2006 The Android Open Source Project
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-
-#ifndef SkPerspIter_DEFINED
-#define SkPerspIter_DEFINED
-
-#include "SkMatrix.h"
-
-class SkPerspIter {
-public:
- /** Iterate a line through the matrix [x,y] ... [x+count-1, y].
- @param m The matrix we will be iterating a line through
- @param x The initial X coordinate to be mapped through the matrix
- @param y The initial Y coordinate to be mapped through the matrix
- @param count The number of points (x,y) (x+1,y) (x+2,y) ... we will eventually map
- */
- SkPerspIter(const SkMatrix& m, SkScalar x, SkScalar y, int count);
-
- /** Return the buffer of [x,y] fixed point values we will be filling.
- This always returns the same value, so it can be saved across calls to
- next().
- */
- const SkFixed* getXY() const { return fStorage; }
-
- /** Return the number of [x,y] pairs that have been filled in the getXY() buffer.
- When this returns 0, the iterator is finished.
- */
- int next();
-
-private:
- enum {
- kShift = 4,
- kCount = (1 << kShift)
- };
- const SkMatrix& fMatrix;
- SkFixed fStorage[kCount * 2];
- SkFixed fX, fY;
- SkScalar fSX, fSY;
- int fCount;
-};
-
-#endif
diff --git a/include/core/SkRelay.h b/include/core/SkRelay.h
deleted file mode 100644
index ef09ce4403..0000000000
--- a/include/core/SkRelay.h
+++ /dev/null
@@ -1,43 +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 SkTRelay_DEFINED
-#define SkTRelay_DEFINED
-
-#include "SkRefCnt.h"
-
-/**
- * Similar to a weakptr in java, a Relay allows for a back-ptr to an
- * object to be "safe", without using a hard reference-count.
- *
- * Typically, the target creates a Relay with a pointer to itself. Whenever it
- * wants to have another object maintain a safe-ptr to it, it gives them a
- * Relay, which they ref()/unref(). Through the Relay each external object can
- * retrieve a pointer to the Target. However, when the Target goes away, it
- * clears the Relay pointer to it (relay->set(NULL)) and then unref()s the
- * Relay. The other objects still have a ref on the Relay, but now when they
- * call get() the receive a NULL.
- */
-template <template T> class SkTRelay : public SkRefCnt {
-public:
- SkTRelay(T* ptr) : fPtr(ptr) {}
-
- // consumers call this
- T* get() const { return fPtr; }
-
- // producer calls this
- void set(T* ptr) { fPtr = ptr; }
-
- void clear() { this->set(NULL); }
-
-private:
- T* fPtr;
-};
-
-#endif