add abstract wrapper for platform-specific bitmap backends
git-svn-id: http://skia.googlecode.com/svn/trunk@596 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
94d1464cca
commit
ce4e53a234
@ -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.
|
||||
*/
|
||||
|
@ -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&);
|
||||
|
@ -371,6 +371,10 @@ void SkBitmap::notifyPixelsChanged() const {
|
||||
}
|
||||
}
|
||||
|
||||
SkGpuTexture* SkBitmap::getTexture() const {
|
||||
return fPixelRef ? fPixelRef->getTexture() : NULL;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SkMallocPixelRef::SkMallocPixelRef(void* storage, size_t size,
|
||||
|
Loading…
Reference in New Issue
Block a user