aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-04-17 10:53:29 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-17 15:22:42 +0000
commit12e946b4bfdf598bffb276776ea6e25439e25265 (patch)
tree3431130a5008af573c497da13243da360d147918 /include
parent81340c65e0e507ca544e32c0fa0c6880f371eaff (diff)
deprecate odd variants of SkCanvas::readPixels
Bug: skia:6513 Change-Id: I51179a85f0912d3f899c368c30a943d346dd1d05 Reviewed-on: https://skia-review.googlesource.com/13589 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkCanvas.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 399eb21111..ddbab07480 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -230,14 +230,16 @@ public:
*/
bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY);
+ bool readPixels(const SkPixmap&, int srcX, int srcY);
+ bool readPixels(const SkBitmap&, int srcX, int srcY);
+#ifdef SK_SUPPORT_LEGACY_CANVAS_READPIXELS
/**
* Helper for calling readPixels(info, ...). This call will check if bitmap has been allocated.
* If not, it will attempt to call allocPixels(). If this fails, it will return false. If not,
* it calls through to readPixels(info, ...) and returns its result.
*/
bool readPixels(SkBitmap* bitmap, int srcX, int srcY);
-
/**
* Helper for allocating pixels and then calling readPixels(info, ...). The bitmap is resized
* to the intersection of srcRect and the base-layer bounds. On success, pixels will be
@@ -245,6 +247,7 @@ public:
* set to empty.
*/
bool readPixels(const SkIRect& srcRect, SkBitmap* bitmap);
+#endif
/**
* This method affects the pixels in the base-layer, and operates in pixel coordinates,