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

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

Issue 1886613003: Remove GrTextureStorageAllocator. This was added from Chromium but never used and not expected to b… (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « include/gpu/GrTypes.h ('k') | src/gpu/GrTextureProvider.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 2011 Google Inc. 2 * Copyright 2011 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 "GrContext.h" 8 #include "GrContext.h"
9 #include "GrCaps.h" 9 #include "GrCaps.h"
10 #include "GrGpu.h" 10 #include "GrGpu.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 return desc.fOrigin; 83 return desc.fOrigin;
84 } 84 }
85 } 85 }
86 } 86 }
87 87
88 ////////////////////////////////////////////////////////////////////////////// 88 //////////////////////////////////////////////////////////////////////////////
89 GrTexture::GrTexture(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc, 89 GrTexture::GrTexture(GrGpu* gpu, LifeCycle lifeCycle, const GrSurfaceDesc& desc,
90 GrSLType samplerType, bool wasMipMapDataProvided) 90 GrSLType samplerType, bool wasMipMapDataProvided)
91 : INHERITED(gpu, lifeCycle, desc) 91 : INHERITED(gpu, lifeCycle, desc)
92 , fSamplerType(samplerType) { 92 , fSamplerType(samplerType) {
93 if (!this->isExternal() && !GrPixelConfigIsCompressed(desc.fConfig) && 93 if (!this->isExternal() && !GrPixelConfigIsCompressed(desc.fConfig)) {
94 !desc.fTextureStorageAllocator.fAllocateTextureStorage) {
95 GrScratchKey key; 94 GrScratchKey key;
96 GrTexturePriv::ComputeScratchKey(desc, &key); 95 GrTexturePriv::ComputeScratchKey(desc, &key);
97 this->setScratchKey(key); 96 this->setScratchKey(key);
98 } 97 }
99 98
100 if (wasMipMapDataProvided) { 99 if (wasMipMapDataProvided) {
101 fMipMapsStatus = kValid_MipMapsStatus; 100 fMipMapsStatus = kValid_MipMapsStatus;
102 fMaxMipMapLevel = SkMipMap::ComputeLevelCount(fDesc.fWidth, fDesc.fHeigh t); 101 fMaxMipMapLevel = SkMipMap::ComputeLevelCount(fDesc.fWidth, fDesc.fHeigh t);
103 } else { 102 } else {
104 fMipMapsStatus = kNotAllocated_MipMapsStatus; 103 fMipMapsStatus = kNotAllocated_MipMapsStatus;
(...skipping 13 matching lines...) Expand all
118 SkASSERT(desc.fSampleCnt < (1 << 8)); 117 SkASSERT(desc.fSampleCnt < (1 << 8));
119 SkASSERT(flags < (1 << 10)); 118 SkASSERT(flags < (1 << 10));
120 SkASSERT(static_cast<int>(origin) < (1 << 8)); 119 SkASSERT(static_cast<int>(origin) < (1 << 8));
121 120
122 GrScratchKey::Builder builder(key, kType, 3); 121 GrScratchKey::Builder builder(key, kType, 3);
123 builder[0] = desc.fWidth; 122 builder[0] = desc.fWidth;
124 builder[1] = desc.fHeight; 123 builder[1] = desc.fHeight;
125 builder[2] = desc.fConfig | (desc.fIsMipMapped << 5) | (desc.fSampleCnt << 6 ) | (flags << 14) 124 builder[2] = desc.fConfig | (desc.fIsMipMapped << 5) | (desc.fSampleCnt << 6 ) | (flags << 14)
126 | (origin << 24); 125 | (origin << 24);
127 } 126 }
OLDNEW
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/GrTextureProvider.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698