aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPixmap.h
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2016-04-15 06:59:38 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-15 06:59:39 -0700
commit8c3fd4f1b49a77634b73f787c6c49d34039a16f0 (patch)
tree7634a1926ff900026077d9cec0b6d0c96a1bd6e2 /include/core/SkPixmap.h
parent3faf74b8364491ca806f523fbb1d8a97be592663 (diff)
spriteblitter for memcpy case (for all configs)
Diffstat (limited to 'include/core/SkPixmap.h')
-rw-r--r--include/core/SkPixmap.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h
index 5f90273a97..c3c27bec78 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; }
+ 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));
}