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

Unified Diff: src/core/SkSpecialImage.h

Issue 1861643003: Upgrade SkSpecialImage to have getTextureRef & getROPixels entry points (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Really fix no-GPU build Created 4 years, 8 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
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; }

Powered by Google App Engine
This is Rietveld 408576698