| Index: include/core/SkPixmap.h
|
| diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h
|
| index a2ce6cd7889fc10b73f34feb61ea00378da7d312..3b554cf7ac120ef4b88d365f6a73e7c565968022 100644
|
| --- a/include/core/SkPixmap.h
|
| +++ b/include/core/SkPixmap.h
|
| @@ -44,7 +44,8 @@ public:
|
| SkAlphaType alphaType() const { return fInfo.alphaType(); }
|
| bool isOpaque() const { return fInfo.isOpaque(); }
|
|
|
| - int64_t getSafeSize64() const { return fInfo.getSafeSize64(fRowBytes); }
|
| + uint64_t getSize64() const { return sk_64_mul(fInfo.height(), fRowBytes); }
|
| + uint64_t getSafeSize64() const { return fInfo.getSafeSize64(fRowBytes); }
|
| size_t getSafeSize() const { return fInfo.getSafeSize(fRowBytes); }
|
|
|
| const uint32_t* addr32() const {
|
| @@ -94,6 +95,20 @@ public:
|
| return const_cast<uint8_t*>(this->addr8(x, y));
|
| }
|
|
|
| + // copy methods
|
| +
|
| + bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes,
|
| + int srcX, int srcY) const;
|
| + bool readPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes) const {
|
| + return this->readPixels(dstInfo, dstPixels, dstRowBytes, 0, 0);
|
| + }
|
| + bool readPixels(const SkPixmap& dst, int srcX, int srcY) const {
|
| + return this->readPixels(dst.info(), dst.writable_addr(), dst.rowBytes(), srcX, srcY);
|
| + }
|
| + bool readPixels(const SkPixmap& dst) const {
|
| + return this->readPixels(dst.info(), dst.writable_addr(), dst.rowBytes(), 0, 0);
|
| + }
|
| +
|
| private:
|
| const void* fPixels;
|
| SkColorTable* fCTable;
|
|
|