aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPixmap.h
diff options
context:
space:
mode:
authorGravatar fmalita <fmalita@chromium.org>2015-07-27 10:27:28 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-07-27 10:27:29 -0700
commit9a5d1ab54d52a912bb3ac9f74ee01bba079639e5 (patch)
tree8a3483083be8e674d7e0e14ccc7fd22de47724e3 /include/core/SkPixmap.h
parent1c63436f39796d3ed5f27f54d07f6cc120006b94 (diff)
Make peekPixels() usable with raster surface snapshots
SkSurface_Raster snapshots do not lock their backing bitmaps when the pixel ref is shared - they only lock on deep-copy. But since for raster surfaces the pixels are always in memory, I think it would be OK to also lock in the former case. This allows for optimized (zero-copy) reads of raster surface snapshot data. R=reed@google.com Review URL: https://codereview.chromium.org/1256993002
Diffstat (limited to 'include/core/SkPixmap.h')
-rw-r--r--include/core/SkPixmap.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h
index 05c7101735..faae85e797 100644
--- a/include/core/SkPixmap.h
+++ b/include/core/SkPixmap.h
@@ -18,7 +18,7 @@ struct SkMask;
* Pairs SkImageInfo with actual pixels and rowbytes. This class does not try to manage the
* lifetime of the pixel memory (nor the colortable if provided).
*/
-class SkPixmap {
+class SK_API SkPixmap {
public:
SkPixmap()
: fPixels(NULL), fCTable(NULL), fRowBytes(0), fInfo(SkImageInfo::MakeUnknown(0, 0))
@@ -151,7 +151,7 @@ private:
/////////////////////////////////////////////////////////////////////////////////////////////
-class SkAutoPixmapStorage : public SkPixmap {
+class SK_API SkAutoPixmapStorage : public SkPixmap {
public:
SkAutoPixmapStorage();
~SkAutoPixmapStorage();
@@ -206,7 +206,7 @@ private:
/////////////////////////////////////////////////////////////////////////////////////////////
-class SkAutoPixmapUnlock : ::SkNoncopyable {
+class SK_API SkAutoPixmapUnlock : ::SkNoncopyable {
public:
SkAutoPixmapUnlock() : fUnlockProc(NULL), fIsLocked(false) {}
SkAutoPixmapUnlock(const SkPixmap& pm, void (*unlock)(void*), void* ctx)