Chromium Code Reviews| Index: include/core/SkPixmap.h |
| diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h |
| index 5f90273a97dacfba6217e820217546c78d8b73a8..c3c27bec78ac4bece736520749a612e3204b12ab 100644 |
| --- a/include/core/SkPixmap.h |
| +++ b/include/core/SkPixmap.h |
| @@ -80,7 +80,7 @@ public: |
| * Return the shift amount per pixel (i.e. 0 for 1-byte per pixel, 1 for 2-bytes per pixel |
| * colortypes, 2 for 4-bytes per pixel colortypes). Return 0 for kUnknown_SkColorType. |
| */ |
| - int shiftPerPixel() const { return fInfo.bytesPerPixel() >> 1; } |
|
mtklein
2016/04/15 13:29:21
:) It had to break down at some point.
reed1
2016/04/15 13:49:10
:( yep
|
| + int shiftPerPixel() const { return fInfo.shiftPerPixel(); } |
| uint64_t getSize64() const { return sk_64_mul(fInfo.height(), fRowBytes); } |
| uint64_t getSafeSize64() const { return fInfo.getSafeSize64(fRowBytes); } |
| @@ -141,6 +141,9 @@ public: |
| // Writable versions |
| void* writable_addr() const { return const_cast<void*>(fPixels); } |
| + void* writable_addr(int x, int y) const { |
| + return const_cast<void*>(this->addr(x, y)); |
| + } |
| uint8_t* writable_addr8(int x, int y) const { |
| return const_cast<uint8_t*>(this->addr8(x, y)); |
| } |