Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1030)

Unified Diff: src/core/SkBitmapProcState_procs.h

Issue 719213008: SkColorTable locking serves no purpose anymore. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: oops Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/core/SkColorTable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState_procs.h
diff --git a/src/core/SkBitmapProcState_procs.h b/src/core/SkBitmapProcState_procs.h
index 0d3b723e6766fc6e7921d03e6a7bd3ccc355e279..3b4cef395506cc197774f90399458c3bc13ae7a2 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
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | src/core/SkColorTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698