aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkPixmap.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-02-09 13:26:46 -0500
committerGravatar Mike Reed <reed@google.com>2018-02-09 20:38:32 +0000
commit7fcfb621998648ba018e3b89e2cab3135bd46a1f (patch)
treece43ae14602539ef7b541e91cc1372c1ee4b4e0e /include/core/SkPixmap.h
parent47cf048abecb5064b9e851ea01f75b23797c1611 (diff)
move a bunch of helpers from SkImageInfo.h into priv
Bug: skia: Change-Id: I8c91cfdb89e4f22448d1201d391556fe43d86dca Reviewed-on: https://skia-review.googlesource.com/105289 Commit-Queue: Mike Reed <reed@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Cary Clark <caryclark@google.com>
Diffstat (limited to 'include/core/SkPixmap.h')
-rw-r--r--include/core/SkPixmap.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/core/SkPixmap.h b/include/core/SkPixmap.h
index f7fe710c6e..c8b83004f0 100644
--- a/include/core/SkPixmap.h
+++ b/include/core/SkPixmap.h
@@ -279,7 +279,7 @@ public:
@return readable unsigned 8-bit pointer to pixels
*/
const uint8_t* addr8() const {
- SkASSERT(1 == SkColorTypeBytesPerPixel(fInfo.colorType()));
+ SkASSERT(1 == fInfo.bytesPerPixel());
return reinterpret_cast<const uint8_t*>(fPixels);
}
@@ -292,7 +292,7 @@ public:
@return readable unsigned 16-bit pointer to pixels
*/
const uint16_t* addr16() const {
- SkASSERT(2 == SkColorTypeBytesPerPixel(fInfo.colorType()));
+ SkASSERT(2 == fInfo.bytesPerPixel());
return reinterpret_cast<const uint16_t*>(fPixels);
}
@@ -305,7 +305,7 @@ public:
@return readable unsigned 32-bit pointer to pixels
*/
const uint32_t* addr32() const {
- SkASSERT(4 == SkColorTypeBytesPerPixel(fInfo.colorType()));
+ SkASSERT(4 == fInfo.bytesPerPixel());
return reinterpret_cast<const uint32_t*>(fPixels);
}
@@ -318,7 +318,7 @@ public:
@return readable unsigned 64-bit pointer to pixels
*/
const uint64_t* addr64() const {
- SkASSERT(8 == SkColorTypeBytesPerPixel(fInfo.colorType()));
+ SkASSERT(8 == fInfo.bytesPerPixel());
return reinterpret_cast<const uint64_t*>(fPixels);
}
@@ -332,7 +332,7 @@ public:
@return readable unsigned 16-bit pointer to first component of pixels
*/
const uint16_t* addrF16() const {
- SkASSERT(8 == SkColorTypeBytesPerPixel(fInfo.colorType()));
+ SkASSERT(8 == fInfo.bytesPerPixel());
SkASSERT(kRGBA_F16_SkColorType == fInfo.colorType());
return reinterpret_cast<const uint16_t*>(fPixels);
}