privatization of SkPerspIter.h
authormike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 9 Aug 2012 01:01:38 +0000 (01:01 +0000)
committermike@reedtribe.org <mike@reedtribe.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Thu, 9 Aug 2012 01:01:38 +0000 (01:01 +0000)
remove obsolete SkRelay.h

git-svn-id: http://skia.googlecode.com/svn/trunk@5025 2bbb7eff-a529-9590-31e7-b0007b416f81

include/core/SkRelay.h [deleted file]
src/core/SkPerspIter.h [moved from include/core/SkPerspIter.h with 100% similarity]

diff --git a/include/core/SkRelay.h b/include/core/SkRelay.h
deleted file mode 100644 (file)
index ef09ce4..0000000
+++ /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