Index: src/core/SkImageCacherator.cpp |
diff --git a/src/core/SkImageCacherator.cpp b/src/core/SkImageCacherator.cpp |
index 4a8521743d3acad2ab9c0cf2a2e734e8319ae629..b4101f15c73b59ccffcf48b76eb6605ff52b342a 100644 |
--- a/src/core/SkImageCacherator.cpp |
+++ b/src/core/SkImageCacherator.cpp |
@@ -249,7 +249,8 @@ static GrTexture* set_key_and_return(GrTexture* tex, const GrUniqueKey& key) { |
*/ |
GrTexture* SkImageCacherator::lockTexture(GrContext* ctx, const GrUniqueKey& key, |
const SkImage* client, SkImage::CachingHint chint, |
- bool willBeMipped) { |
+ bool willBeMipped, |
+ SkSourceGammaTreatment gammaTreatment) { |
// Values representing the various texture lock paths we can take. Used for logging the path |
// taken to a histogram. |
enum LockTexturePath { |
@@ -315,7 +316,7 @@ GrTexture* SkImageCacherator::lockTexture(GrContext* ctx, const GrUniqueKey& key |
if (this->tryLockAsBitmap(&bitmap, client, chint)) { |
GrTexture* tex = nullptr; |
if (willBeMipped) { |
- tex = GrGenerateMipMapsAndUploadToTexture(ctx, bitmap); |
+ tex = GrGenerateMipMapsAndUploadToTexture(ctx, bitmap, gammaTreatment); |
} |
if (!tex) { |
tex = GrUploadBitmapToTexture(ctx, bitmap); |
@@ -334,17 +335,20 @@ GrTexture* SkImageCacherator::lockTexture(GrContext* ctx, const GrUniqueKey& key |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParams& params, |
+ SkSourceGammaTreatment gammaTreatment, |
const SkImage* client, SkImage::CachingHint chint) { |
if (!ctx) { |
return nullptr; |
} |
- return GrImageTextureMaker(ctx, this, client, chint).refTextureForParams(params); |
+ return GrImageTextureMaker(ctx, this, client, chint).refTextureForParams(params, |
+ gammaTreatment); |
} |
#else |
GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParams&, |
+ SkSourceGammaTreatment gammaTreatment, |
const SkImage* client, SkImage::CachingHint) { |
return nullptr; |
} |