From 7fcfb621998648ba018e3b89e2cab3135bd46a1f Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Fri, 9 Feb 2018 13:26:46 -0500 Subject: 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 Reviewed-by: Mike Klein Reviewed-by: Cary Clark --- include/core/SkPixmap.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/core/SkPixmap.h') 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(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(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(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(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(fPixels); } -- cgit v1.2.3