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

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

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 6 years, 1 month 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/gpu/GrLayerHoister.cpp ('k') | src/gpu/GrSWMaskHelper.h » ('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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "GrResourceCache.h" 9 #include "GrResourceCache.h"
10 #include "GrGpuResource.h" 10 #include "GrGpuResource.h"
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 } 174 }
175 175
176 void GrResourceCache::notifyPurgable(const GrGpuResource* resource) { 176 void GrResourceCache::notifyPurgable(const GrGpuResource* resource) {
177 // Remove scratch textures from the cache the moment they become purgeable i f 177 // Remove scratch textures from the cache the moment they become purgeable i f
178 // scratch texture reuse is turned off. 178 // scratch texture reuse is turned off.
179 SkASSERT(resource->getCacheEntry()); 179 SkASSERT(resource->getCacheEntry());
180 if (resource->getCacheEntry()->key().getResourceType() == GrTexturePriv::Res ourceType() && 180 if (resource->getCacheEntry()->key().getResourceType() == GrTexturePriv::Res ourceType() &&
181 resource->getCacheEntry()->key().isScratch() && 181 resource->getCacheEntry()->key().isScratch() &&
182 !fCaps->reuseScratchTextures() && 182 !fCaps->reuseScratchTextures() &&
183 !(static_cast<const GrTexture*>(resource)->desc().fFlags & 183 !(static_cast<const GrTexture*>(resource)->desc().fFlags &
184 kRenderTarget_GrTextureFlagBit)) { 184 kRenderTarget_GrSurfaceFlag)) {
185 this->deleteResource(resource->getCacheEntry()); 185 this->deleteResource(resource->getCacheEntry());
186 } 186 }
187 } 187 }
188 188
189 GrGpuResource* GrResourceCache::find(const GrResourceKey& key) { 189 GrGpuResource* GrResourceCache::find(const GrResourceKey& key) {
190 // GrResourceCache2 is responsible for scratch resources. 190 // GrResourceCache2 is responsible for scratch resources.
191 SkASSERT(!key.isScratch()); 191 SkASSERT(!key.isScratch());
192 192
193 GrAutoResourceCacheValidate atcv(this); 193 GrAutoResourceCacheValidate atcv(this);
194 194
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 SkDebugf("Budget: %d items %d bytes\n", fMaxCount, fMaxBytes); 425 SkDebugf("Budget: %d items %d bytes\n", fMaxCount, fMaxBytes);
426 SkDebugf("\t\tEntry Count: current %d (%d locked, %d scratch %.2g%% full), h igh %d\n", 426 SkDebugf("\t\tEntry Count: current %d (%d locked, %d scratch %.2g%% full), h igh %d\n",
427 fEntryCount, locked, scratch, countUtilization, fHighWaterEntryC ount); 427 fEntryCount, locked, scratch, countUtilization, fHighWaterEntryC ount);
428 SkDebugf("\t\tEntry Bytes: current %d (%.2g%% full) high %d\n", 428 SkDebugf("\t\tEntry Bytes: current %d (%.2g%% full) high %d\n",
429 fEntryBytes, byteUtilization, fHighWaterEntryBytes); 429 fEntryBytes, byteUtilization, fHighWaterEntryBytes);
430 } 430 }
431 431
432 #endif 432 #endif
433 433
434 /////////////////////////////////////////////////////////////////////////////// 434 ///////////////////////////////////////////////////////////////////////////////
OLDNEW
« no previous file with comments | « src/gpu/GrLayerHoister.cpp ('k') | src/gpu/GrSWMaskHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698