| Index: src/image/SkSurface.cpp
|
| diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp
|
| index 3ca5747252bd147da14c18ec8f5494bca99291c7..13b7d65546172c604f0ff257838fde8062470e37 100644
|
| --- a/src/image/SkSurface.cpp
|
| +++ b/src/image/SkSurface.cpp
|
| @@ -170,6 +170,20 @@ const void* SkSurface::peekPixels(SkImageInfo* info, size_t* rowBytes) {
|
| return this->getCanvas()->peekPixels(info, rowBytes);
|
| }
|
|
|
| +bool SkSurface::readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
|
| + int srcX, int srcY) {
|
| + return this->getCanvas()->readPixels(dstInfo, dstPixels, dstRowBytes, srcX, srcY);
|
| +}
|
| +
|
| +bool SkSurface::readPixels(SkBitmap* dst, const SkIRect* srcRect) {
|
| + SkIRect storage;
|
| + if (NULL == srcRect) {
|
| + storage.set(0, 0, this->width(), this->height());
|
| + srcRect = &storage;
|
| + }
|
| + return this->getCanvas()->readPixels(*srcRect, dst);
|
| +}
|
| +
|
| //////////////////////////////////////////////////////////////////////////////////////
|
| #ifdef SK_SUPPORT_LEGACY_TEXTRENDERMODE
|
|
|
|
|