diff options
author | 2013-12-06 18:51:08 +0000 | |
---|---|---|
committer | 2013-12-06 18:51:08 +0000 | |
commit | 5b132b28da61e89cdcb84e95f30a58f8184739fc (patch) | |
tree | e0a12eb2be846b7f2135f58de677284a3fcc6fad /include/core/SkImageInfo.h | |
parent | 3e89524e747b513986abfeeea00b6fac79593f26 (diff) |
Revert "PixelRef now returns (nearly) everything that is currently in SkBitmap. The goal is to refactor bitmap later to remove redundancy, and more interestingly, remove the chance for a disconnect between the actual (pixelref) rowbytes and config, and the one claimed by the bitmap."
This reverts commit 154e08b2f5904ef533da694e3510befcb9a3f3e2.
revert due to warnings
Review URL: https://codereview.chromium.org/108513003
git-svn-id: http://skia.googlecode.com/svn/trunk@12538 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkImageInfo.h')
-rw-r--r-- | include/core/SkImageInfo.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/include/core/SkImageInfo.h b/include/core/SkImageInfo.h index 366d00af70..c22249b842 100644 --- a/include/core/SkImageInfo.h +++ b/include/core/SkImageInfo.h @@ -10,9 +10,6 @@ #include "SkTypes.h" -class SkFlattenableWriteBuffer; -class SkFlattenableReadBuffer; - /** * Describes how to interpret the alpha compoent of a pixel. */ @@ -66,7 +63,6 @@ static inline bool SkAlphaTypeIsOpaque(SkAlphaType at) { enum SkColorType { kAlpha_8_SkColorType, kRGB_565_SkColorType, - kARGB_4444_SkColorType, kRGBA_8888_SkColorType, kBGRA_8888_SkColorType, kIndex8_SkColorType, @@ -86,7 +82,6 @@ static int SkColorTypeBytesPerPixel(SkColorType ct) { static const uint8_t gSize[] = { 1, // Alpha_8 2, // RGB_565 - 2, // ARGB_4444 4, // RGBA_8888 4, // BGRA_8888 1, // kIndex_8 @@ -117,26 +112,12 @@ struct SkImageInfo { return SkColorTypeBytesPerPixel(fColorType); } - size_t minRowBytes() const { - return fWidth * this->bytesPerPixel(); - } - bool operator==(const SkImageInfo& other) const { return 0 == memcmp(this, &other, sizeof(other)); } bool operator!=(const SkImageInfo& other) const { return 0 != memcmp(this, &other, sizeof(other)); } - - void unflatten(SkFlattenableReadBuffer&); - void flatten(SkFlattenableWriteBuffer&) const; - - size_t getSafeSize(size_t rowBytes) const { - if (0 == fHeight) { - return 0; - } - return (fHeight - 1) * rowBytes + fWidth * this->bytesPerPixel(); - } }; #endif |