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

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

Issue 2259863002: Rename WorseCaseSize to WorstCasSize (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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/gpu/GrTexture.cpp ('k') | src/gpu/gl/GrGLRenderTarget.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 "GrTextureProvider.h" 8 #include "GrTextureProvider.h"
9 9
10 #include "GrCaps.h" 10 #include "GrCaps.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 GrTexturePriv::ComputeScratchKey(*desc, &key); 132 GrTexturePriv::ComputeScratchKey(*desc, &key);
133 uint32_t scratchFlags = 0; 133 uint32_t scratchFlags = 0;
134 if (kNoPendingIO_ScratchTextureFlag & flags) { 134 if (kNoPendingIO_ScratchTextureFlag & flags) {
135 scratchFlags = GrResourceCache::kRequireNoPendingIO_ScratchFlag; 135 scratchFlags = GrResourceCache::kRequireNoPendingIO_ScratchFlag;
136 } else if (!(desc->fFlags & kRenderTarget_GrSurfaceFlag)) { 136 } else if (!(desc->fFlags & kRenderTarget_GrSurfaceFlag)) {
137 // If it is not a render target then it will most likely be populate d by 137 // If it is not a render target then it will most likely be populate d by
138 // writePixels() which will trigger a flush if the texture has pendi ng IO. 138 // writePixels() which will trigger a flush if the texture has pendi ng IO.
139 scratchFlags = GrResourceCache::kPreferNoPendingIO_ScratchFlag; 139 scratchFlags = GrResourceCache::kPreferNoPendingIO_ScratchFlag;
140 } 140 }
141 GrGpuResource* resource = fCache->findAndRefScratchResource(key, 141 GrGpuResource* resource = fCache->findAndRefScratchResource(key,
142 GrSurface::Wo rseCaseSize(*desc), 142 GrSurface::Wo rstCaseSize(*desc),
143 scratchFlags) ; 143 scratchFlags) ;
144 if (resource) { 144 if (resource) {
145 GrSurface* surface = static_cast<GrSurface*>(resource); 145 GrSurface* surface = static_cast<GrSurface*>(resource);
146 GrRenderTarget* rt = surface->asRenderTarget(); 146 GrRenderTarget* rt = surface->asRenderTarget();
147 if (rt && fGpu->caps()->discardRenderTargetSupport()) { 147 if (rt && fGpu->caps()->discardRenderTargetSupport()) {
148 rt->discard(); 148 rt->discard();
149 } 149 }
150 return surface->asTexture(); 150 return surface->asTexture();
151 } 151 }
152 } 152 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 GrTexture* GrTextureProvider::findAndRefTextureByUniqueKey(const GrUniqueKey& ke y) { 194 GrTexture* GrTextureProvider::findAndRefTextureByUniqueKey(const GrUniqueKey& ke y) {
195 ASSERT_SINGLE_OWNER 195 ASSERT_SINGLE_OWNER
196 GrGpuResource* resource = this->findAndRefResourceByUniqueKey(key); 196 GrGpuResource* resource = this->findAndRefResourceByUniqueKey(key);
197 if (resource) { 197 if (resource) {
198 GrTexture* texture = static_cast<GrSurface*>(resource)->asTexture(); 198 GrTexture* texture = static_cast<GrSurface*>(resource)->asTexture();
199 SkASSERT(texture); 199 SkASSERT(texture);
200 return texture; 200 return texture;
201 } 201 }
202 return NULL; 202 return NULL;
203 } 203 }
OLDNEW
« no previous file with comments | « src/gpu/GrTexture.cpp ('k') | src/gpu/gl/GrGLRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698