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

Unified Diff: src/core/SkConfig8888.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/core/SkColorTable.cpp ('k') | src/core/SkProcSpriteBlitter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkConfig8888.cpp
diff --git a/src/core/SkConfig8888.cpp b/src/core/SkConfig8888.cpp
index b0572c0544c6a1eb15b4f01ee21c69813e6fceba..8b47a20633fa67bb95fdc6416f2f44faa9524160 100644
--- a/src/core/SkConfig8888.cpp
+++ b/src/core/SkConfig8888.cpp
@@ -154,13 +154,13 @@ bool SkPixelInfo::CopyPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t
dstPI.fAlphaType = dstInfo.alphaType();
dstPI.fPixels = dstPixels;
dstPI.fRowBytes = dstRB;
-
+
SkSrcPixelInfo srcPI;
srcPI.fColorType = srcInfo.colorType();
srcPI.fAlphaType = srcInfo.alphaType();
srcPI.fPixels = srcPixels;
srcPI.fRowBytes = srcRB;
-
+
return srcPI.convertPixelsTo(&dstPI, width, height);
}
@@ -196,13 +196,13 @@ bool SkPixelInfo::CopyPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t
// Our method for converting to 4444 assumes premultiplied.
return false;
}
-
+
const SkPMColor* table = NULL;
if (kIndex_8_SkColorType == srcInfo.colorType()) {
if (NULL == ctable) {
return false;
}
- table = ctable->lockColors();
+ table = ctable->readColors();
}
for (int y = 0; y < height; ++y) {
@@ -222,10 +222,6 @@ bool SkPixelInfo::CopyPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t
dstPixels = (char*)dstPixels + dstRB;
srcPixels = (const char*)srcPixels + srcRB;
}
-
- if (table) {
- ctable->unlockColors();
- }
return true;
}
« no previous file with comments | « src/core/SkColorTable.cpp ('k') | src/core/SkProcSpriteBlitter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698