diff options
author | Robert Phillips <robertphillips@google.com> | 2017-03-20 14:37:13 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-21 11:39:41 +0000 |
commit | 0db235bc0278887c344eb25b4681e9cca4cf892a (patch) | |
tree | 853a3e84db8d689e36ff5e6730ac38d77a621f14 /src/image/SkImage_Base.h | |
parent | 53262d0ff466668bfbc76893ba5a581203269572 (diff) |
Make SkImage_Gpu be deferred
This CL removes the GrTexture-based ctor forcing everyone to create deferred SkImage_Gpus.
split out into:
https://skia-review.googlesource.com/c/9106/ (Remove atlas creation from GrResourceProvider)
Change-Id: I266bbe089c242fe54d5b7adcc7895aa5a39440a0
Reviewed-on: https://skia-review.googlesource.com/6680
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/image/SkImage_Base.h')
-rw-r--r-- | src/image/SkImage_Base.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/image/SkImage_Base.h b/src/image/SkImage_Base.h index 284af0d1a6..e0319ddc25 100644 --- a/src/image/SkImage_Base.h +++ b/src/image/SkImage_Base.h @@ -47,13 +47,20 @@ public: virtual bool onReadPixels(const SkImageInfo& dstInfo, void* dstPixels, size_t dstRowBytes, int srcX, int srcY, CachingHint) const = 0; + // MDB TODO: this entry point needs to go away virtual GrTexture* peekTexture() const { return nullptr; } #if SK_SUPPORT_GPU + virtual GrTextureProxy* peekProxy() const { return nullptr; } virtual sk_sp<GrTextureProxy> asTextureProxyRef() const { return nullptr; } virtual sk_sp<GrTextureProxy> asTextureProxyRef(GrContext*, const GrSamplerParams&, SkColorSpace*, sk_sp<SkColorSpace>*, SkScalar scaleAdjust[2]) const = 0; virtual sk_sp<GrTexture> refPinnedTexture(uint32_t* uniqueID) const { return nullptr; } + virtual GrBackendObject onGetTextureHandle(bool flushPendingGrContextIO, + GrSurfaceOrigin* origin) const { + return 0; + } + virtual GrTexture* onGetTexture() const { return nullptr; } #endif virtual SkImageCacherator* peekCacherator() const { return nullptr; } |