diff options
author | 2014-12-02 09:11:25 -0800 | |
---|---|---|
committer | 2014-12-02 09:11:25 -0800 | |
commit | 775b8199a214af57c3ea7969e9d456f5f3eb137f (patch) | |
tree | b4729e4aea47f46a371957cf713a4cc135717a3d /src/gpu/SkGr.cpp | |
parent | ba1bf8af8d63ce866e3099c410228ba814491957 (diff) |
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
Diffstat (limited to 'src/gpu/SkGr.cpp')
-rw-r--r-- | src/gpu/SkGr.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp index a86ee60317..d71b05ad7d 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); |