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
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index a86ee60..d71b05a 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -56,13 +56,11 @@
SkSrcPixelInfo srcPI;
srcPI.fColorType = kN32_SkColorType;
srcPI.fAlphaType = kPremul_SkAlphaType;
- srcPI.fPixels = ctable->lockColors();
+ srcPI.fPixels = ctable->readColors();
srcPI.fRowBytes = count * sizeof(SkPMColor);
srcPI.convertPixelsTo(&dstPI, count, 1);
- ctable->unlockColors();
-
// always skip a full 256 number of entries, even if we memcpy'd fewer
dst += 256 * sizeof(GrColor);
@@ -205,7 +203,7 @@
// then we don't know how to scale the image to match it...
if (ktx.width() != bm.width() || ktx.height() != bm.height()) {
return NULL;
- }
+ }
bytes = ktx.pixelData();
desc.fConfig = kETC1_GrPixelConfig;
@@ -481,7 +479,7 @@
dm = SkXfermode::kISA_Coeff;
}
grPaint->setBlendFunc(sk_blend_to_grblend(sm), sk_blend_to_grblend(dm));
-
+
//set the color of the paint to the one of the parameter
grPaint->setColor(paintColor);