diff options
author | 2017-03-22 18:13:37 +0000 | |
---|---|---|
committer | 2017-03-22 18:13:42 +0000 | |
commit | e3060ba87c87bb2f96469389d0ace7b82f85749e (patch) | |
tree | eff67624cdb256362441fde3957685cfcfede729 /src/image/SkImage_Generator.cpp | |
parent | 33d2055e594177b27360f84e0631b26d74a55a9b (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/image/SkImage_Generator.cpp')
-rw-r--r-- | src/image/SkImage_Generator.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/image/SkImage_Generator.cpp b/src/image/SkImage_Generator.cpp index 72ef877359..c8bf732aa3 100644 --- a/src/image/SkImage_Generator.cpp +++ b/src/image/SkImage_Generator.cpp @@ -88,8 +88,13 @@ sk_sp<GrTextureProxy> SkImage_Generator::asTextureProxyRef(GrContext* context, SkColorSpace* dstColorSpace, sk_sp<SkColorSpace>* texColorSpace, SkScalar scaleAdjust[2]) const { - return fCache.lockAsTextureProxy(context, params, dstColorSpace, - texColorSpace, this, scaleAdjust); + sk_sp<GrTexture> tex(fCache.lockAsTexture(context, params, dstColorSpace, + texColorSpace, this, scaleAdjust)); + if (!tex) { + return nullptr; + } + + return GrSurfaceProxy::MakeWrapped(std::move(tex)); } #endif |