aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrImageIDTextureAdjuster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrImageIDTextureAdjuster.cpp')
-rw-r--r--src/gpu/GrImageIDTextureAdjuster.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/GrImageIDTextureAdjuster.cpp b/src/gpu/GrImageIDTextureAdjuster.cpp
index 5ba99d20de..21c2f33358 100644
--- a/src/gpu/GrImageIDTextureAdjuster.cpp
+++ b/src/gpu/GrImageIDTextureAdjuster.cpp
@@ -82,7 +82,7 @@ GrBitmapTextureMaker::GrBitmapTextureMaker(GrContext* context, const SkBitmap& b
}
GrTexture* GrBitmapTextureMaker::refOriginalTexture(bool willBeMipped) {
- GrTexture* tex;
+ GrTexture* tex = nullptr;
if (fOriginalKey.isValid()) {
tex = this->context()->textureProvider()->findAndRefTextureByUniqueKey(fOriginalKey);
@@ -90,11 +90,10 @@ GrTexture* GrBitmapTextureMaker::refOriginalTexture(bool willBeMipped) {
return tex;
}
}
- // disable mipmapping until we generate anisotropic mipmap levels
- willBeMipped = false;
if (willBeMipped) {
tex = GrGenerateMipMapsAndUploadToTexture(this->context(), fBitmap);
- } else {
+ }
+ if (!tex) {
tex = GrUploadBitmapToTexture(this->context(), fBitmap);
}
if (tex && fOriginalKey.isValid()) {