Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: include/core/SkBitmap.h

Issue 1143173011: use pixmaps for dst in sprites -- NO BITMAPS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add dox Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 041afe2f2ef58fb0dec2c829786e7505edcc02cf..c070203d04f4bfe9d5e087498bf5427f71e62abb 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 {
« no previous file with comments | « no previous file | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698