diff options
author | 2014-12-02 09:11:25 -0800 | |
---|---|---|
committer | 2014-12-02 09:11:25 -0800 | |
commit | 775b8199a214af57c3ea7969e9d456f5f3eb137f (patch) | |
tree | b4729e4aea47f46a371957cf713a4cc135717a3d /src/core/SkBitmapProcState_procs.h | |
parent | ba1bf8af8d63ce866e3099c410228ba814491957 (diff) |
SkColorTable locking serves no purpose anymore.
The only thing the unlock methods were doing was assert their balance.
This removes the unlock methods and renames the lock methods "read".
BUG=skia:
Review URL: https://codereview.chromium.org/719213008
Diffstat (limited to 'src/core/SkBitmapProcState_procs.h')
-rw-r--r-- | src/core/SkBitmapProcState_procs.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/SkBitmapProcState_procs.h b/src/core/SkBitmapProcState_procs.h index 0d3b723e67..3b4cef3955 100644 --- a/src/core/SkBitmapProcState_procs.h +++ b/src/core/SkBitmapProcState_procs.h @@ -154,10 +154,10 @@ static inline U8CPU Filter_8(unsigned x, unsigned y, #define SRCTYPE uint8_t #define CHECKSTATE(state) SkASSERT(kIndex_8_SkColorType == state.fBitmap->colorType()); \ SkASSERT(state.fAlphaScale == 256) -#define PREAMBLE(state) const SkPMColor* SK_RESTRICT table = state.fBitmap->getColorTable()->lockColors() +#define PREAMBLE(state) const SkPMColor* SK_RESTRICT table = state.fBitmap->getColorTable()->readColors() #define RETURNDST(src) table[src] #define SRC_TO_FILTER(src) table[src] -#define POSTAMBLE(state) state.fBitmap->getColorTable()->unlockColors() +#define POSTAMBLE(state) #include "SkBitmapProcState_sample.h" #undef FILTER_PROC @@ -169,10 +169,10 @@ static inline U8CPU Filter_8(unsigned x, unsigned y, #define CHECKSTATE(state) SkASSERT(kIndex_8_SkColorType == state.fBitmap->colorType()); \ SkASSERT(state.fAlphaScale < 256) #define PREAMBLE(state) unsigned alphaScale = state.fAlphaScale; \ - const SkPMColor* SK_RESTRICT table = state.fBitmap->getColorTable()->lockColors() + const SkPMColor* SK_RESTRICT table = state.fBitmap->getColorTable()->readColors() #define RETURNDST(src) SkAlphaMulQ(table[src], alphaScale) #define SRC_TO_FILTER(src) table[src] -#define POSTAMBLE(state) state.fBitmap->getColorTable()->unlockColors() +#define POSTAMBLE(state) #include "SkBitmapProcState_sample.h" // SRC == 4444 @@ -280,10 +280,10 @@ static inline U8CPU Filter_8(unsigned x, unsigned y, #define SRCTYPE uint8_t #define CHECKSTATE(state) SkASSERT(kIndex_8_SkColorType == state.fBitmap->colorType()); \ SkASSERT(state.fBitmap->isOpaque()) -#define PREAMBLE(state) const uint16_t* SK_RESTRICT table = state.fBitmap->getColorTable()->lock16BitCache() +#define PREAMBLE(state) const uint16_t* SK_RESTRICT table = state.fBitmap->getColorTable()->read16BitCache() #define RETURNDST(src) table[src] #define SRC_TO_FILTER(src) table[src] -#define POSTAMBLE(state) state.fBitmap->getColorTable()->unlock16BitCache() +#define POSTAMBLE(state) #include "SkBitmapProcState_sample.h" /////////////////////////////////////////////////////////////////////////////// @@ -335,9 +335,9 @@ static inline U8CPU Filter_8(unsigned x, unsigned y, #define SRCTYPE uint8_t #define DSTTYPE uint32_t #define CHECKSTATE(state) SkASSERT(kIndex_8_SkColorType == state.fBitmap->colorType()) -#define PREAMBLE(state) const SkPMColor* SK_RESTRICT table = state.fBitmap->getColorTable()->lockColors() +#define PREAMBLE(state) const SkPMColor* SK_RESTRICT table = state.fBitmap->getColorTable()->readColors() #define SRC_TO_FILTER(src) table[src] -#define POSTAMBLE(state) state.fBitmap->getColorTable()->unlockColors() +#define POSTAMBLE(state) #include "SkBitmapProcState_shaderproc.h" #undef NAME_WRAP |