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

Unified Diff: src/image/SkImage_Base.h

Issue 793723002: add readPixels to SkImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use better name on test Created 6 years 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 | « src/image/SkImage.cpp ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Base.h
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h
index 8f0fefe4f8622c110669c3f48fb60b557e522903..8c1dfada638db398c6b645c7e0c264c54a3b470c 100644
--- a/src/image/SkImage_Base.h
+++ b/src/image/SkImage_Base.h
@@ -41,13 +41,14 @@ public:
const SkRect& dst, const SkPaint*) const = 0;
virtual SkSurface* onNewSurface(const SkImageInfo&, const SkSurfaceProps&) const = 0;
- // Default impl calls onDraw
- virtual bool onReadPixels(SkBitmap*, const SkIRect& subset) const;
-
virtual const void* onPeekPixels(SkImageInfo*, size_t* /*rowBytes*/) const {
return NULL;
}
+ // Default impl calls onDraw
+ virtual bool onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
+ int srcX, int srcY) const;
+
virtual GrTexture* onGetTexture() const { return NULL; }
// return a read-only copy of the pixels. We promise to not modify them,
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/image/SkImage_Raster.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698