diff options
author | reed <reed@google.com> | 2015-06-05 06:58:22 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-05 06:58:22 -0700 |
commit | cb674144545866ed31a9ab5dd8e7152282017e40 (patch) | |
tree | 2cae43e0d5be50a29843aa3f1fa3000f8a5be4d4 /include | |
parent | 89d59883f39d4097183e632b86da439052499527 (diff) |
use pixmaps for dst in sprites -- NO BITMAPS
BUG=skia:
TBR=scroggo@google.com
Review URL: https://codereview.chromium.org/1143173011
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkBitmap.h | 11 |
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 { |