From d316e77c1e1967b439a9a6c11146c54e367bff71 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Wed, 14 Dec 2016 12:04:46 +0000 Subject: Revert "Add a deferred copy surface (take 2)" This reverts commit 398487a850431cf495330d4023607df5305a311f. Reason for revert: See if this is causing the roll failure Original change's description: > Add a deferred copy surface (take 2) > > 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: Ide560f569aede5e622420dc2f30eef76357d69f4 > Reviewed-on: https://skia-review.googlesource.com/5939 > Reviewed-by: Brian Osman > Reviewed-by: Brian Salomon > Commit-Queue: Robert Phillips > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I1ef40f0d5fb0bca62031f94f10eb18acd753e913 Reviewed-on: https://skia-review.googlesource.com/6024 Commit-Queue: Robert Phillips Reviewed-by: Robert Phillips --- include/gpu/GrSurfaceContext.h | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) (limited to 'include/gpu/GrSurfaceContext.h') diff --git a/include/gpu/GrSurfaceContext.h b/include/gpu/GrSurfaceContext.h index e1c799e3ae..a05d37fed3 100644 --- a/include/gpu/GrSurfaceContext.h +++ b/include/gpu/GrSurfaceContext.h @@ -8,8 +8,6 @@ #ifndef GrSurfaceContext_DEFINED #define GrSurfaceContext_DEFINED -#include "../private/GrSurfaceProxy.h" - #include "SkRefCnt.h" class GrAuditTrail; @@ -26,30 +24,7 @@ class SK_API GrSurfaceContext : public SkRefCnt { public: ~GrSurfaceContext() override {} - /* - * Copy 'src' into the proxy backing this context - * @param src src of pixels - * @param srcRect the subset of 'src' to copy - * @param dstPoint the origin of the 'srcRect' in the destination coordinate space - * @return true if the copy succeeded; false otherwise - * - * Note: Notionally, 'srcRect' is clipped to 'src's extent with 'dstPoint' being adjusted. - * Then the 'srcRect' offset by 'dstPoint' is clipped against the dst's extent. - * The end result is only valid src pixels and dst pixels will be touched but the copied - * regions will not be shifted. - */ - bool copy(GrSurfaceProxy* src, const SkIRect& srcRect, const SkIPoint& dstPoint) { - return this->onCopy(src, srcRect, dstPoint); - } - - bool copy(GrSurfaceProxy* src) { - return this->onCopy(src, - SkIRect::MakeWH(src->width(), src->height()), - SkIPoint::Make(0, 0)); - } - - // TODO: this is virtual b.c. this object doesn't have a pointer to the wrapped GrSurfaceProxy? - virtual GrSurfaceProxy* asDeferredSurface() = 0; + virtual bool copySurface(GrSurface* src, const SkIRect& srcRect, const SkIPoint& dstPoint) = 0; GrAuditTrail* auditTrail() { return fAuditTrail; } @@ -63,13 +38,6 @@ protected: // In debug builds we guard against improper thread handling SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) - -private: - virtual bool onCopy(GrSurfaceProxy* src, - const SkIRect& srcRect, - const SkIPoint& dstPoint) = 0; - - typedef SkRefCnt INHERITED; }; #endif -- cgit v1.2.3