From cb674144545866ed31a9ab5dd8e7152282017e40 Mon Sep 17 00:00:00 2001 From: reed Date: Fri, 5 Jun 2015 06:58:22 -0700 Subject: use pixmaps for dst in sprites -- NO BITMAPS BUG=skia: TBR=scroggo@google.com Review URL: https://codereview.chromium.org/1143173011 --- include/core/SkBitmap.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/core/SkBitmap.h') 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 { -- cgit v1.2.3