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

Side by Side Diff: src/gpu/GrImageIDTextureAdjuster.cpp

Issue 1744413002: Disabling mipmap generation until anisotropic mipmap levels are generated. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrImageIDTextureAdjuster.h" 8 #include "GrImageIDTextureAdjuster.h"
9 9
10 #include "GrContext.h" 10 #include "GrContext.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 GrTexture* GrBitmapTextureMaker::refOriginalTexture(bool willBeMipped) { 84 GrTexture* GrBitmapTextureMaker::refOriginalTexture(bool willBeMipped) {
85 GrTexture* tex; 85 GrTexture* tex;
86 86
87 if (fOriginalKey.isValid()) { 87 if (fOriginalKey.isValid()) {
88 tex = this->context()->textureProvider()->findAndRefTextureByUniqueKey(f OriginalKey); 88 tex = this->context()->textureProvider()->findAndRefTextureByUniqueKey(f OriginalKey);
89 if (tex) { 89 if (tex) {
90 return tex; 90 return tex;
91 } 91 }
92 } 92 }
93 93 // disable mipmapping until we generate anisotropic mipmap levels
94 willBeMipped = false;
94 if (willBeMipped) { 95 if (willBeMipped) {
95 tex = GrGenerateMipMapsAndUploadToTexture(this->context(), fBitmap); 96 tex = GrGenerateMipMapsAndUploadToTexture(this->context(), fBitmap);
96 } else { 97 } else {
97 tex = GrUploadBitmapToTexture(this->context(), fBitmap); 98 tex = GrUploadBitmapToTexture(this->context(), fBitmap);
98 } 99 }
99 if (tex && fOriginalKey.isValid()) { 100 if (tex && fOriginalKey.isValid()) {
100 tex->resourcePriv().setUniqueKey(fOriginalKey); 101 tex->resourcePriv().setUniqueKey(fOriginalKey);
101 GrInstallBitmapUniqueKeyInvalidator(fOriginalKey, fBitmap.pixelRef()); 102 GrInstallBitmapUniqueKeyInvalidator(fOriginalKey, fBitmap.pixelRef());
102 } 103 }
103 return tex; 104 return tex;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (fOriginalKey.isValid() && SkImage::kAllow_CachingHint == fCachingHint) { 139 if (fOriginalKey.isValid() && SkImage::kAllow_CachingHint == fCachingHint) {
139 MakeCopyKeyFromOrigKey(fOriginalKey, stretch, paramsCopyKey); 140 MakeCopyKeyFromOrigKey(fOriginalKey, stretch, paramsCopyKey);
140 } 141 }
141 } 142 }
142 143
143 void GrImageTextureMaker::didCacheCopy(const GrUniqueKey& copyKey) { 144 void GrImageTextureMaker::didCacheCopy(const GrUniqueKey& copyKey) {
144 if (fClient) { 145 if (fClient) {
145 as_IB(fClient)->notifyAddedToCache(); 146 as_IB(fClient)->notifyAddedToCache();
146 } 147 }
147 } 148 }
OLDNEW
« no previous file with comments | « src/core/SkImageCacherator.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698