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

Unified Diff: src/gpu/SkGr.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/SkSpriteBlitter_RGB16.cpp ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGr.cpp
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index a86ee6031701cd1d6ec863251b271127eef775bd..d71b05ad7d16f8742d66c30aceb3ed40651ceb7e 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -56,13 +56,11 @@ static void build_index8_data(void* buffer, const SkBitmap& bitmap) {
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 @@ static GrTexture *load_etc1_texture(GrContext* ctx, bool cache,
// 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 @@ void SkPaint2GrPaintNoShader(GrContext* context, const SkPaint& skPaint, GrColor
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);
« no previous file with comments | « src/core/SkSpriteBlitter_RGB16.cpp ('k') | src/images/SkDecodingImageGenerator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698