aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkImageCacherator.h
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/core/SkImageCacherator.h
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/core/SkImageCacherator.h')
-rw-r--r--src/core/SkImageCacherator.h25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/core/SkImageCacherator.h b/src/core/SkImageCacherator.h
index e179236748..38d14d06ec 100644
--- a/src/core/SkImageCacherator.h
+++ b/src/core/SkImageCacherator.h
@@ -15,7 +15,6 @@
class GrCaps;
class GrContext;
class GrSamplerParams;
-class GrTextureProxy;
class GrUniqueKey;
class SkBitmap;
class SkImage;
@@ -52,7 +51,6 @@ public:
bool lockAsBitmap(GrContext*, SkBitmap*, const SkImage* client, SkColorSpace* dstColorSpace,
SkImage::CachingHint = SkImage::kAllow_CachingHint);
-#if SK_SUPPORT_GPU
/**
* Returns a ref() on the texture produced by this generator. The caller must call unref()
* when it is done. Will return nullptr on failure.
@@ -60,20 +58,17 @@ public:
* If not NULL, the client will be notified (->notifyAddedToCache()) when resources are
* added to the cache on its behalf.
*
- * The caller is responsible for calling proxy->unref() when they are done.
+ * The caller is responsible for calling texture->unref() when they are done.
*
* The scaleAdjust in/out parameter will return any scale adjustment that needs
* to be applied to the absolute texture coordinates in the case where the image
* was resized to meet the sampling requirements (e.g., resized out to the next power of 2).
* It can be null if the caller knows resizing will not be required.
*/
- sk_sp<GrTextureProxy> lockAsTextureProxy(GrContext*, const GrSamplerParams&,
- SkColorSpace* dstColorSpace,
- sk_sp<SkColorSpace>* texColorSpace,
- const SkImage* client,
- SkScalar scaleAdjust[2],
- SkImage::CachingHint = SkImage::kAllow_CachingHint);
-#endif
+ GrTexture* lockAsTexture(GrContext*, const GrSamplerParams&, SkColorSpace* dstColorSpace,
+ sk_sp<SkColorSpace>* texColorSpace, const SkImage* client,
+ SkScalar scaleAdjust[2],
+ SkImage::CachingHint = SkImage::kAllow_CachingHint);
/**
* If the underlying src naturally is represented by an encoded blob (in SkData), this returns
@@ -134,14 +129,10 @@ private:
bool tryLockAsBitmap(SkBitmap*, const SkImage*, SkImage::CachingHint, CachedFormat,
const SkImageInfo&);
#if SK_SUPPORT_GPU
- // Returns the texture proxy. If the cacherator is generating the texture and wants to cache it,
+ // Returns the texture. If the cacherator is generating the texture and wants to cache it,
// it should use the passed in key (if the key is valid).
- sk_sp<GrTextureProxy> lockTextureProxy(GrContext*,
- const GrUniqueKey& key,
- const SkImage* client,
- SkImage::CachingHint,
- bool willBeMipped,
- SkColorSpace* dstColorSpace);
+ GrTexture* lockTexture(GrContext*, const GrUniqueKey& key, const SkImage* client,
+ SkImage::CachingHint, bool willBeMipped, SkColorSpace* dstColorSpace);
// Returns the color space of the texture that would be returned if you called lockTexture.
// Separate code path to allow querying of the color space for textures that cached (even
// externally).