aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrImageTextureMaker.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-03-22 18:13:37 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-22 18:13:42 +0000
commite3060ba87c87bb2f96469389d0ace7b82f85749e (patch)
treeeff67624cdb256362441fde3957685cfcfede729 /src/gpu/GrImageTextureMaker.cpp
parent33d2055e594177b27360f84e0631b26d74a55a9b (diff)
Revert "Make SkImageCacherator be deferred"
This reverts commit 801f8b824fee6397422e47537f0f13034ac54ce6. Reason for revert: Failures on Tegra3-based Android devices (so, npot issues) Original change's description: > Make SkImageCacherator be deferred > > Split out of: https://skia-review.googlesource.com/c/8823/ (Remove GrFragmentProcessor-derived class' GrTexture-based ctors) > > Change-Id: I16cf0aea9d887e5ebe053e9b5c94a970dc254beb > Reviewed-on: https://skia-review.googlesource.com/9945 > Reviewed-by: Brian Salomon <bsalomon@google.com> > Commit-Queue: Robert Phillips <robertphillips@google.com> > TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: Ib143ef86cfad4a221e25145679ba7e48f6f7f3ba Reviewed-on: https://skia-review.googlesource.com/9949 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrImageTextureMaker.cpp')
-rw-r--r--src/gpu/GrImageTextureMaker.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/gpu/GrImageTextureMaker.cpp b/src/gpu/GrImageTextureMaker.cpp
index 47a2f4f14c..a7fc1a353c 100644
--- a/src/gpu/GrImageTextureMaker.cpp
+++ b/src/gpu/GrImageTextureMaker.cpp
@@ -32,21 +32,16 @@ GrImageTextureMaker::GrImageTextureMaker(GrContext* context, SkImageCacherator*
}
GrTexture* GrImageTextureMaker::refOriginalTexture(bool willBeMipped, SkColorSpace* dstColorSpace) {
- sk_sp<GrTextureProxy> proxy = fCacher->lockTextureProxy(this->context(), fOriginalKey,
- fClient, fCachingHint, willBeMipped,
- dstColorSpace);
- if (!proxy) {
- return nullptr;
- }
-
- sk_sp<GrTexture> tex(SkSafeRef(proxy->instantiate(this->context()->resourceProvider())));
- return tex.release();
+ return fCacher->lockTexture(this->context(), fOriginalKey, fClient, fCachingHint, willBeMipped,
+ dstColorSpace);
}
sk_sp<GrTextureProxy> GrImageTextureMaker::refOriginalTextureProxy(bool willBeMipped,
SkColorSpace* dstColorSpace) {
- return fCacher->lockTextureProxy(this->context(), fOriginalKey, fClient, fCachingHint,
- willBeMipped, dstColorSpace);
+ sk_sp<GrTexture> tex(fCacher->lockTexture(this->context(), fOriginalKey, fClient, fCachingHint,
+ willBeMipped, dstColorSpace));
+
+ return GrSurfaceProxy::MakeWrapped(std::move(tex));
}
void GrImageTextureMaker::makeCopyKey(const CopyParams& stretch, GrUniqueKey* paramsCopyKey,