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

Unified Diff: src/gpu/GrTextureProvider.cpp

Issue 1271353003: Fix variable shadowing and unreachable code that it caused (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextureProvider.cpp
diff --git a/src/gpu/GrTextureProvider.cpp b/src/gpu/GrTextureProvider.cpp
index 0a6b248d7a85d8d89c66d374de99cf257f5b0080..97d5a79da19ee6413ee804f3ed07da576f10bcd5 100644
--- a/src/gpu/GrTextureProvider.cpp
+++ b/src/gpu/GrTextureProvider.cpp
@@ -61,14 +61,14 @@ GrTexture* GrTextureProvider::internalCreateApproxTexture(const GrSurfaceDesc& d
}
GrTexture* GrTextureProvider::refScratchTexture(const GrSurfaceDesc& inDesc,
- uint32_t scratchFlags) {
+ uint32_t flags) {
SkASSERT(!this->isAbandoned());
SkASSERT(!GrPixelConfigIsCompressed(inDesc.fConfig));
SkTCopyOnFirstWrite<GrSurfaceDesc> desc(inDesc);
if (fGpu->caps()->reuseScratchTextures() || (desc->fFlags & kRenderTarget_GrSurfaceFlag)) {
- if (!(kExact_ScratchTextureFlag & scratchFlags)) {
+ if (!(kExact_ScratchTextureFlag & flags)) {
// bin by pow2 with a reasonable min
const int minSize = SkTMin(16, fGpu->caps()->minTextureSize());
GrSurfaceDesc* wdesc = desc.writable();
@@ -79,7 +79,7 @@ GrTexture* GrTextureProvider::refScratchTexture(const GrSurfaceDesc& inDesc,
GrScratchKey key;
GrTexturePriv::ComputeScratchKey(*desc, &key);
uint32_t scratchFlags = 0;
- if (kNoPendingIO_ScratchTextureFlag & scratchFlags) {
+ if (kNoPendingIO_ScratchTextureFlag & flags) {
scratchFlags = GrResourceCache::kRequireNoPendingIO_ScratchFlag;
} else if (!(desc->fFlags & kRenderTarget_GrSurfaceFlag)) {
// If it is not a render target then it will most likely be populated by
@@ -97,7 +97,7 @@ GrTexture* GrTextureProvider::refScratchTexture(const GrSurfaceDesc& inDesc,
}
}
- if (!(kNoCreate_ScratchTextureFlag & scratchFlags)) {
+ if (!(kNoCreate_ScratchTextureFlag & flags)) {
return fGpu->createTexture(*desc, true, NULL, 0);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698