Index: src/core/SkSpecialImage.h |
diff --git a/src/core/SkSpecialImage.h b/src/core/SkSpecialImage.h |
index 4de28ebd163d2225122bcd868711900d5879e1db..acd24d196ec4b6e2650860327ac0faf4bfec83bf 100644 |
--- a/src/core/SkSpecialImage.h |
+++ b/src/core/SkSpecialImage.h |
@@ -120,19 +120,20 @@ public: |
*/ |
GrTexture* peekTexture() const; |
+ /** |
+ * Regardless of the underlying backing store, return the contents as a GrTexture. |
+ * The active portion of the texture can be retrieved via 'subset'. |
+ */ |
+ GrTexture* asTextureRef(GrContext*) const; |
+ |
// TODO: hide this whe the imagefilter all have a consistent draw path (see skbug.com/5063) |
/** |
- * If the SpecialImage is backed by cpu pixels, return the const address |
- * of those pixels and, if not null, the ImageInfo, rowBytes, and, if present, |
- * the color table. The returned address(es) is/are only valid while the image object |
- * is in scope. |
+ * Regardless of the underlying backing store, return the contents as an SkBitmap |
* |
* The returned ImageInfo represents the backing memory. Use 'subset' |
* to get the active portion's dimensions. |
- * |
- * On failure, return false and ignore the pixmap parameter. |
*/ |
- bool peekPixels(SkPixmap*) const; |
+ bool getROPixels(SkBitmap*) const; |
protected: |
SkSpecialImage(SkImageFilter::Proxy* proxy, const SkIRect& subset, uint32_t uniqueID) |
@@ -146,10 +147,6 @@ protected: |
friend class TestingSpecialImageAccess; |
friend class TestingSpecialSurfaceAccess; |
- // This entry point is for testing only. It does a readback from VRAM for |
- // GPU-backed special images. |
- bool testingOnlyGetROPixels(SkBitmap*) const; |
- |
// TODO: remove this ASAP (see skbug.com/4965) |
SkImageFilter::Proxy* proxy() const { return fProxy; } |