From e137db8569e7a10d809980609688b3acfaec612a Mon Sep 17 00:00:00 2001 From: bsalomon Date: Sat, 31 Jan 2015 20:10:56 -0800 Subject: 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 --- src/gpu/effects/GrTextureStripAtlas.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gpu/effects') 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(fCacheKey); builder.finish(); - fTexture = fDesc.fContext->findAndRefCachedTexture(key); + fTexture = fDesc.fContext->findAndRefTexture(texDesc, key, ¶ms); if (NULL == fTexture) { - fTexture = fDesc.fContext->createTexture(texDesc, NULL, 0); - SkAssertResult(fDesc.fContext->addResourceToCache(key, fTexture)); + fTexture = fDesc.fContext->createTexture(¶ms, texDesc, key, NULL, 0); // This is a new texture, so all of our cache info is now invalid this->initLRU(); fKeyTable.rewind(); -- cgit v1.2.3