aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkDevice.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-05-26 11:31:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-26 11:31:54 -0700
commit884e97cb04db7ed053a866567ee9c6e4c01f993a (patch)
tree1a9052f1a6e85b13d71e07c2fcda57398832c4de /include/core/SkDevice.h
parent6a44c6a7d89b748fb040d41697a337d357d7fa22 (diff)
change internals over to SkPixmap and stop using accessBitmap
Diffstat (limited to 'include/core/SkDevice.h')
-rw-r--r--include/core/SkDevice.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 3bdcfcf8a3..c23b2973ee 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -82,7 +82,7 @@ public:
bool writePixels(const SkImageInfo&, const void*, size_t rowBytes, int x, int y);
- void* accessPixels(SkImageInfo* info, size_t* rowBytes);
+ bool accessPixels(SkPixmap* pmap);
/**
* Return the device's associated gpu render target, or NULL.
@@ -239,7 +239,9 @@ protected:
virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, const SkPath&,
const SkMatrix*, const SkPaint&);
+
bool readPixels(const SkImageInfo&, void* dst, size_t rowBytes, int x, int y);
+ bool peekPixels(SkPixmap*);
///////////////////////////////////////////////////////////////////////////
@@ -272,11 +274,8 @@ protected:
}
protected:
- // default impl returns NULL
- virtual SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&);
-
- // default impl returns NULL
- virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes);
+ virtual SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) { return NULL; }
+ virtual bool onPeekPixels(SkPixmap*) { return false; }
/**
* The caller is responsible for "pre-clipping" the dst. The impl can assume that the dst
@@ -294,10 +293,7 @@ protected:
*/
virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int x, int y);
- /**
- * Default impl returns NULL.
- */
- virtual void* onAccessPixels(SkImageInfo* info, size_t* rowBytes);
+ virtual bool onAccessPixels(SkPixmap*) { return false; }
/**
* Leaky properties are those which the device should be applying but it isn't.