aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkBitmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkBitmap.h')
-rw-r--r--include/core/SkBitmap.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 041afe2f2e..c070203d04 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -654,6 +654,17 @@ public:
bool extractAlpha(SkBitmap* dst, const SkPaint* paint, Allocator* allocator,
SkIPoint* offset) const;
+ /**
+ * If the pixels are available from this bitmap (w/o locking) return true, and fill out the
+ * specified pixmap (if not null). If the pixels are not available (either because there are
+ * none, or becuase accessing them would require locking or other machinary) return false and
+ * ignore the pixmap parameter.
+ *
+ * Note: if this returns true, the results (in the pixmap) are only valid until the bitmap
+ * is changed in anyway, in which case the results are invalid.
+ */
+ bool peekPixels(SkPixmap*) const;
+
SkDEBUGCODE(void validate() const;)
class Allocator : public SkRefCnt {