aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-09-09 16:01:26 +0000
committerGravatar reed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2010-09-09 16:01:26 +0000
commitce4e53a2347040a3c145768c193a7a7958c0d4ec (patch)
treec442d9144ad6547869062f56589d9ff6114d3ca1 /include/core
parent94d1464ccab74c9304bbb5d6e72bf6478634aee8 (diff)
add abstract wrapper for platform-specific bitmap backends
git-svn-id: http://skia.googlecode.com/svn/trunk@596 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkBitmap.h7
-rw-r--r--include/core/SkPixelRef.h7
2 files changed, 14 insertions, 0 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 1c16b780e2..1f6f5a6b03 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -30,6 +30,9 @@ class SkRegion;
class SkFlattenableReadBuffer;
class SkFlattenableWriteBuffer;
+// This is an opaque class, not interpreted by skia
+class SkGpuTexture;
+
/** \class SkBitmap
The SkBitmap class specifies a raster bitmap. A bitmap has an integer width
@@ -262,6 +265,10 @@ public:
fColorTable != NULL);
}
+ /** Returns the pixelRef's texture, or NULL
+ */
+ SkGpuTexture* getTexture() const;
+
/** Return the bitmap's colortable (if any). Does not affect the colortable's
reference count.
*/
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index 82e5ca7b5e..8375cc7f74 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -25,6 +25,9 @@ class SkMutex;
class SkFlattenableReadBuffer;
class SkFlattenableWriteBuffer;
+// this is an opaque class, not interpreted by skia
+class SkGpuTexture;
+
/** \class SkPixelRef
This class is the smart container for pixel memory, and is used with
@@ -105,6 +108,10 @@ public:
*/
void setURI(const SkString& uri) { fURI = uri; }
+ /** Are we really wrapping a texture instead of a bitmap?
+ */
+ virtual SkGpuTexture* getTexture() { return NULL; }
+
// serialization
typedef SkPixelRef* (*Factory)(SkFlattenableReadBuffer&);