aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/SkGr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/SkGr.cpp')
-rw-r--r--src/gpu/SkGr.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gpu/SkGr.cpp b/src/gpu/SkGr.cpp
index cf50f6004e..c2e284154a 100644
--- a/src/gpu/SkGr.cpp
+++ b/src/gpu/SkGr.cpp
@@ -14,6 +14,7 @@
#include "GrGpuResourcePriv.h"
#include "GrImageIDTextureAdjuster.h"
#include "GrTextureParamsAdjuster.h"
+#include "GrTexturePriv.h"
#include "GrTypes.h"
#include "GrXferProcessor.h"
#include "GrYUVProvider.h"
@@ -385,8 +386,14 @@ GrTexture* GrGenerateMipMapsAndUploadToTexture(GrContext* ctx, const SkBitmap& b
texels[i].fRowBytes = generatedMipLevel.fPixmap.rowBytes();
}
- return ctx->textureProvider()->createMipMappedTexture(desc, SkBudgeted::kYes, texels.get(),
- mipLevelCount);
+ {
+ GrTexture* texture = ctx->textureProvider()->createMipMappedTexture(desc,
+ SkBudgeted::kYes,
+ texels.get(),
+ mipLevelCount);
+ texture->texturePriv().setGammaTreatment(gammaTreatment);
+ return texture;
+ }
}
GrTexture* GrUploadMipMapToTexture(GrContext* ctx, const SkImageInfo& info,