| Index: src/core/SkImageCacherator.cpp
|
| diff --git a/src/core/SkImageCacherator.cpp b/src/core/SkImageCacherator.cpp
|
| index 4a8521743d3acad2ab9c0cf2a2e734e8319ae629..199ca946c5b83b7ff6c5f5666d90c155e96aee11 100644
|
| --- a/src/core/SkImageCacherator.cpp
|
| +++ b/src/core/SkImageCacherator.cpp
|
| @@ -249,7 +249,7 @@ 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, bool gammaCorrect) {
|
| // Values representing the various texture lock paths we can take. Used for logging the path
|
| // taken to a histogram.
|
| enum LockTexturePath {
|
| @@ -315,7 +315,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, gammaCorrect);
|
| }
|
| if (!tex) {
|
| tex = GrUploadBitmapToTexture(ctx, bitmap);
|
| @@ -334,18 +334,20 @@ GrTexture* SkImageCacherator::lockTexture(GrContext* ctx, const GrUniqueKey& key
|
| ///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
| GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParams& params,
|
| - const SkImage* client, SkImage::CachingHint chint) {
|
| + bool gammaCorrect, 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, gammaCorrect);
|
| }
|
|
|
| #else
|
|
|
| GrTexture* SkImageCacherator::lockAsTexture(GrContext* ctx, const GrTextureParams&,
|
| - const SkImage* client, SkImage::CachingHint) {
|
| + bool gammaCorrect, const SkImage* client,
|
| + SkImage::CachingHint) {
|
| return nullptr;
|
| }
|
|
|
|
|