Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: src/gpu/GrImageIDTextureAdjuster.cpp

Issue 1835003002: Re-enable CPU mipmap generation for Ganesh. Aniso mips were landed a while ago. However, the CPU bu… (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Don't return uninitialized pointer. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrImageIDTextureAdjuster.cpp
diff --git a/src/gpu/GrImageIDTextureAdjuster.cpp b/src/gpu/GrImageIDTextureAdjuster.cpp
index 5ba99d20de7ffe7b1fd3cd6c4aa98dc4dabdc8d2..21c2f333589b9b1d913220c4063daa99a6475d60 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()) {
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698