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

Unified Diff: src/opts/SkBitmapProcState_opts_mips_dsp.cpp

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/opts/SkBitmapProcState_opts_arm.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/opts/SkBitmapProcState_opts_mips_dsp.cpp
diff --git a/src/opts/SkBitmapProcState_opts_mips_dsp.cpp b/src/opts/SkBitmapProcState_opts_mips_dsp.cpp
index d4f601baa88962cde24b2b7d85b0a7cf816dfd90..6051cd8ab54d1943f853efaaf19f6c522970a686 100644
--- a/src/opts/SkBitmapProcState_opts_mips_dsp.cpp
+++ b/src/opts/SkBitmapProcState_opts_mips_dsp.cpp
@@ -18,7 +18,7 @@ static void SI8_D16_nofilter_DX_mips_dsp(const SkBitmapProcState& s,
SkASSERT(count > 0 && colors != NULL);
SkASSERT(s.fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask));
SkASSERT(SkPaint::kNone_FilterLevel == s.fFilterLevel);
- const uint16_t* SK_RESTRICT table = s.fBitmap->getColorTable()->lock16BitCache();
+ const uint16_t* SK_RESTRICT table = s.fBitmap->getColorTable()->read16BitCache();
const uint8_t* SK_RESTRICT srcAddr = (const uint8_t*)s.fBitmap->getPixels();
SkASSERT((unsigned)xy[0] < (unsigned)s.fBitmap->height());
srcAddr = (const uint8_t*)((const char*)srcAddr + xy[0] * s.fBitmap->rowBytes());
@@ -142,7 +142,6 @@ static void SI8_D16_nofilter_DX_mips_dsp(const SkBitmapProcState& s,
src = srcAddr[*xx++]; *colors++ = table[src];
}
}
- s.fBitmap->getColorTable()->unlock16BitCache();
}
static void SI8_opaque_D32_nofilter_DX_mips_dsp(const SkBitmapProcState& s,
@@ -151,7 +150,7 @@ static void SI8_opaque_D32_nofilter_DX_mips_dsp(const SkBitmapProcState& s,
SkASSERT(count > 0 && colors != NULL);
SkASSERT(s.fInvType <= (SkMatrix::kTranslate_Mask | SkMatrix::kScale_Mask));
SkASSERT(SkPaint::kNone_FilterLevel == s.fFilterLevel);
- const SkPMColor* SK_RESTRICT table = s.fBitmap->getColorTable()->lockColors();
+ const SkPMColor* SK_RESTRICT table = s.fBitmap->getColorTable()->readColors();
const uint8_t* SK_RESTRICT srcAddr = (const uint8_t*)s.fBitmap->getPixels();
srcAddr = (const uint8_t*)((const char*)srcAddr + xy[0] * s.fBitmap->rowBytes());
@@ -363,7 +362,6 @@ static void SI8_opaque_D32_nofilter_DX_mips_dsp(const SkBitmapProcState& s,
"t4", "t5", "t6", "t7", "t8"
);
}
- s.fBitmap->getColorTable()->unlockColors();
}
/* If we replace a sampleproc, then we null-out the associated shaderproc,
« no previous file with comments | « src/opts/SkBitmapProcState_opts_arm.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698