diff options
author | Robert Phillips <robertphillips@google.com> | 2016-12-15 09:23:05 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-15 15:07:39 +0000 |
commit | e2f7d1899d890c2f08571e1bd6c7fa2c5ea1be0b (patch) | |
tree | d290f1a9d5d5e828c7177d230f56356f9fc9bf2e /include/gpu/GrRenderTargetContext.h | |
parent | db8f44f497f2b67b2500bbfc7b11ce7a510c5e5c (diff) |
Add a deferred copy surface (take 3)
This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).
There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.
This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface)
Change-Id: Ib8fd96d0569274ef781366eb900ed8ee839ae9bd
Reviewed-on: https://skia-review.googlesource.com/6109
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu/GrRenderTargetContext.h')
-rw-r--r-- | include/gpu/GrRenderTargetContext.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/gpu/GrRenderTargetContext.h b/include/gpu/GrRenderTargetContext.h index 864055b637..b86b626df6 100644 --- a/include/gpu/GrRenderTargetContext.h +++ b/include/gpu/GrRenderTargetContext.h @@ -50,8 +50,6 @@ class SK_API GrRenderTargetContext : public GrSurfaceContext { public: ~GrRenderTargetContext() override; - bool copySurface(GrSurface* src, const SkIRect& srcRect, const SkIPoint& dstPoint) override; - // TODO: it is odd that we need both the SkPaint in the following 3 methods. // We should extract the text parameters from SkPaint and pass them separately // akin to GrStyle (GrTextInfo?) @@ -469,6 +467,8 @@ private: const SkPath&, const GrStyle&); + bool onCopy(GrSurfaceProxy* src, const SkIRect& srcRect, const SkIPoint& dstPoint) override; + // This entry point allows the GrTextContext-derived classes to add their ops to the GrOpList. void addDrawOp(const GrPipelineBuilder&, const GrClip&, sk_sp<GrDrawOp>); |