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

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

Issue 1836563002: Revert of 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: 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') | src/gpu/SkGr.cpp » ('j') | 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 // disable mipmapping until we generate anisotropic mipmap levels
94 willBeMipped = false;
93 if (willBeMipped) { 95 if (willBeMipped) {
94 tex = GrGenerateMipMapsAndUploadToTexture(this->context(), fBitmap); 96 tex = GrGenerateMipMapsAndUploadToTexture(this->context(), fBitmap);
95 } 97 } else {
96 if (!tex) {
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;
104 } 105 }
105 106
106 void GrBitmapTextureMaker::makeCopyKey(const CopyParams& copyParams, GrUniqueKey * copyKey) { 107 void GrBitmapTextureMaker::makeCopyKey(const CopyParams& copyParams, GrUniqueKey * copyKey) {
(...skipping 31 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') | src/gpu/SkGr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698