diff options
author | 2013-11-26 12:51:57 +0000 | |
---|---|---|
committer | 2013-11-26 12:51:57 +0000 | |
commit | 11f392ed531f05e8de6b6af6ae607f90aeb080c6 (patch) | |
tree | d958adc62566d8102f1189a2b82a28abb684aa64 /include | |
parent | 6300f4d1f3bd2e1a4d991ab28e843bcc3d4a4691 (diff) |
Revert "Revert "remove kA1_Config, as it is no longer supported""
This reverts commit 36d712f2d4c5c79719280ad95523e6aaa88b068e.
BUG=
R=rmistry@google.com, mtklein@google.com
Author: reed@google.com
Review URL: https://codereview.chromium.org/86483002
git-svn-id: http://skia.googlecode.com/svn/trunk@12392 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkBitmap.h | 22 | ||||
-rw-r--r-- | include/core/SkImageDecoder.h | 2 | ||||
-rw-r--r-- | include/core/SkPicture.h | 3 |
3 files changed, 3 insertions, 24 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h index b58925c9db..cd85b6a9b1 100644 --- a/include/core/SkBitmap.h +++ b/include/core/SkBitmap.h @@ -42,12 +42,6 @@ public: enum Config { kNo_Config, //!< bitmap has not been configured - /** - * 1-bit per pixel, (0 is transparent, 1 is opaque) - * Valid as a destination (target of a canvas), but not valid as a src. - * i.e. you can draw into a 1-bit bitmap, but you cannot draw from one. - */ - kA1_Config, kA8_Config, //!< 8-bits per pixel, with only alpha specified (0 is transparent, 0xFF is opaque) kIndex8_Config, //!< 8-bits per pixel, using SkColorTable to specify the colors kRGB_565_Config, //!< 16-bits per pixel, (see SkColorPriv.h for packing) @@ -489,14 +483,6 @@ public: */ inline uint8_t* getAddr8(int x, int y) const; - /** Returns the address of the byte containing the pixel specified by x,y - * for 1bit pixels. - * In debug build, this asserts that the pixels are allocated and locked, - * and that the config is 1-bit, however none of these checks are performed - * in the release build. - */ - inline uint8_t* getAddr1(int x, int y) const; - /** Returns the color corresponding to the pixel specified by x,y for * colortable based bitmaps. * In debug build, this asserts that the pixels are allocated and locked, @@ -818,12 +804,4 @@ inline SkPMColor SkBitmap::getIndex8Color(int x, int y) const { return (*fColorTable)[*((const uint8_t*)fPixels + y * fRowBytes + x)]; } -// returns the address of the byte that contains the x coordinate -inline uint8_t* SkBitmap::getAddr1(int x, int y) const { - SkASSERT(fPixels); - SkASSERT(fConfig == kA1_Config); - SkASSERT((unsigned)x < fWidth && (unsigned)y < fHeight); - return (uint8_t*)fPixels + y * fRowBytes + (x >> 3); -} - #endif diff --git a/include/core/SkImageDecoder.h b/include/core/SkImageDecoder.h index a7e3646553..5745dbd5ba 100644 --- a/include/core/SkImageDecoder.h +++ b/include/core/SkImageDecoder.h @@ -186,7 +186,7 @@ public: src: 32/24, no-alpha -> 4 src: 32/24, yes-alpha -> 5 */ - void setPrefConfigTable(const SkBitmap::Config pref[6]); + void setPrefConfigTable(const SkBitmap::Config pref[5]); /** * Optional table describing the caller's preferred config based on diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h index e371c4369d..42566eddbd 100644 --- a/include/core/SkPicture.h +++ b/include/core/SkPicture.h @@ -218,13 +218,14 @@ protected: // V13: add flag to drawBitmapRectToRect // parameterize blurs by sigma rather than radius // V14: Add flags word to PathRef serialization + // V15: Remove A1 bitmpa config (and renumber remaining configs) #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V13_AND_ALL_OTHER_INSTANCES_TOO static const uint32_t PRIOR_PRIOR_PICTURE_VERSION = 12; // TODO: remove when .skps regenerated #endif #ifndef DELETE_THIS_CODE_WHEN_SKPS_ARE_REBUILT_AT_V14_AND_ALL_OTHER_INSTANCES_TOO static const uint32_t PRIOR_PICTURE_VERSION2 = 13; // TODO: remove when .skps regenerated #endif - static const uint32_t PICTURE_VERSION = 14; + static const uint32_t PICTURE_VERSION = 15; // fPlayback, fRecord, fWidth & fHeight are protected to allow derived classes to // install their own SkPicturePlayback-derived players,SkPictureRecord-derived |