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

Unified Diff: include/core/SkSurface.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 | « include/core/SkImage.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkSurface.h
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h
index 62d2252af1472f108b4ba06a49b5284cb12a05e7..9000b2a28df6e10cd67a7b4ab1cee070f9cfe30f 100644
--- a/include/core/SkSurface.h
+++ b/include/core/SkSurface.h
@@ -214,8 +214,8 @@ public:
/**
* Copy the pixels from the surface into the specified buffer (pixels + rowBytes),
- * converting them into the requested format (dstInfo). The base-layer pixels are read
- * starting at the specified (srcX,srcY) location in the coordinate system of the base-layer.
+ * converting them into the requested format (dstInfo). The surface pixels are read
+ * starting at the specified (srcX,srcY) location.
*
* The specified ImageInfo and (srcX,srcY) offset specifies a source rectangle
*
@@ -228,19 +228,11 @@ public:
*
* This call can fail, returning false, for several reasons:
* - If srcR does not intersect the surface bounds.
- * - If the requested colortype/alphatype cannot be converted from the base-layer's types.
+ * - If the requested colortype/alphatype cannot be converted from the surface's types.
*/
bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY);
- /**
- * Helper for allocating pixels and then calling readPixels(info, ...). The bitmap is resized
- * to the intersection of srcRect and the surface bounds (if srcRect is non-null).
- * On success, pixels will be allocated in bitmap and true returned. On failure,
- * false is returned and bitmap will be set to empty.
- */
- bool readPixels(SkBitmap* dst, const SkIRect* srcRect = NULL);
-
const SkSurfaceProps& props() const { return fProps; }
protected:
« no previous file with comments | « include/core/SkImage.h ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698