aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkSpecialImage.h
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2016-11-01 17:28:40 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-02 15:32:04 +0000
commit8bc06d07f57ede17ccabfa38f1d7e31bbf311ab5 (patch)
tree5b983d773fd391bfc07e6c9429f28ad941fa4bfc /src/core/SkSpecialImage.h
parent9caeb0bc83ab45859a996efecbcd1215be0f1b1e (diff)
Back SkSpecialImage_Gpu with a GrTextureProxy
This is split out of https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus)) The addition of the gpuMemorySize methods is for the SkSpecialImage cache. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4227 Change-Id: Ia9b9d42fb2a0caf61bbfa3ebcc84308c56f541fc Reviewed-on: https://skia-review.googlesource.com/4227 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/core/SkSpecialImage.h')
-rw-r--r--src/core/SkSpecialImage.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/core/SkSpecialImage.h b/src/core/SkSpecialImage.h
index c1f3791edf..99e348920d 100644
--- a/src/core/SkSpecialImage.h
+++ b/src/core/SkSpecialImage.h
@@ -17,6 +17,7 @@
class GrContext;
class GrTexture;
+class GrTextureProxy;
class SkBitmap;
class SkCanvas;
class SkImage;
@@ -82,6 +83,14 @@ public:
sk_sp<SkColorSpace>,
const SkSurfaceProps* = nullptr,
SkAlphaType at = kPremul_SkAlphaType);
+
+ static sk_sp<SkSpecialImage> MakeDeferredFromGpu(GrContext*,
+ const SkIRect& subset,
+ uint32_t uniqueID,
+ sk_sp<GrTextureProxy>,
+ sk_sp<SkColorSpace>,
+ const SkSurfaceProps* = nullptr,
+ SkAlphaType at = kPremul_SkAlphaType);
#endif
/**
@@ -129,6 +138,11 @@ public:
* The active portion of the texture can be retrieved via 'subset'.
*/
sk_sp<GrTexture> asTextureRef(GrContext*) const;
+
+ /**
+ * The same as above but return the contents as a GrTextureProxy.
+ */
+ sk_sp<GrTextureProxy> asTextureProxy(GrContext*) const;
#endif
// TODO: hide this whe the imagefilter all have a consistent draw path (see skbug.com/5063)