aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/effects
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2015-01-31 20:10:56 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-31 20:10:56 -0800
commite137db8569e7a10d809980609688b3acfaec612a (patch)
treef2f41a49f6b250074d4a176c207cc9d64779ef57 /src/gpu/effects
parent8a4527e98a57b1d2dd248a635f0c4fa227be2089 (diff)
Revert of Move npot resizing out of GrContext and simplify GrContext texture functions. (patchset #10 id:200001 of https://codereview.chromium.org/882223003/)
Reason for revert: perf fix didn't fix the cr webgl conformance tests Original issue's description: > Move npot resizing out of GrContext and simplify GrContext texture functions. > > Committed: https://skia.googlesource.com/skia/+/8a8100349105c8c6de39fcb34e47679da7a67f54 > > Committed: https://skia.googlesource.com/skia/+/6c96672491b04cb782bce8fee778124df66524a0 TBR=robertphillips@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/887303002
Diffstat (limited to 'src/gpu/effects')
-rw-r--r--src/gpu/effects/GrTextureStripAtlas.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/effects/GrTextureStripAtlas.cpp b/src/gpu/effects/GrTextureStripAtlas.cpp
index 880a739525..2305586844 100644
--- a/src/gpu/effects/GrTextureStripAtlas.cpp
+++ b/src/gpu/effects/GrTextureStripAtlas.cpp
@@ -190,6 +190,7 @@ GrTextureStripAtlas::AtlasRow* GrTextureStripAtlas::getLRU() {
}
void GrTextureStripAtlas::lockTexture() {
+ GrTextureParams params;
GrSurfaceDesc texDesc;
texDesc.fWidth = fDesc.fWidth;
texDesc.fHeight = fDesc.fHeight;
@@ -201,10 +202,9 @@ void GrTextureStripAtlas::lockTexture() {
builder[0] = static_cast<uint32_t>(fCacheKey);
builder.finish();
- fTexture = fDesc.fContext->findAndRefCachedTexture(key);
+ fTexture = fDesc.fContext->findAndRefTexture(texDesc, key, &params);
if (NULL == fTexture) {
- fTexture = fDesc.fContext->createTexture(texDesc, NULL, 0);
- SkAssertResult(fDesc.fContext->addResourceToCache(key, fTexture));
+ fTexture = fDesc.fContext->createTexture(&params, texDesc, key, NULL, 0);
// This is a new texture, so all of our cache info is now invalid
this->initLRU();
fKeyTable.rewind();