From 7294b851d277d8e703b23657e1a990f1ae24ead6 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Tue, 1 Aug 2017 13:51:44 +0000 Subject: Revert "Remove origin field from GrSurface" This reverts commit df0e09feacb29290fe94d37f921731b18f2edae0. Reason for revert: Experimental revert to see if this is blocking the roll Original change's description: > Remove origin field from GrSurface > > This mainly consists of rm origin from GrSurface and the wrapBackEnd* > methods and then re-adding an explicit origin parameter to all the > GrGpu methods that need it. > > Change-Id: Iabd79ae98b227b5b9409f3ab5bbcc48af9613c18 > Reviewed-on: https://skia-review.googlesource.com/26363 > Reviewed-by: Brian Salomon > Commit-Queue: Robert Phillips TBR=bsalomon@google.com,robertphillips@google.com Change-Id: Id606aa01e84e2b83be71d833eefca477c1ad0d01 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/29220 Reviewed-by: Robert Phillips Commit-Queue: Robert Phillips --- include/gpu/GrSurface.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/gpu/GrSurface.h b/include/gpu/GrSurface.h index 65ac7ec337..4caa842b4a 100644 --- a/include/gpu/GrSurface.h +++ b/include/gpu/GrSurface.h @@ -35,6 +35,11 @@ public: */ SkRect getBoundsRect() const { return SkRect::MakeIWH(this->width(), this->height()); } + GrSurfaceOrigin origin() const { + SkASSERT(kTopLeft_GrSurfaceOrigin == fOrigin || kBottomLeft_GrSurfaceOrigin == fOrigin); + return fOrigin; + } + /** * Retrieves the pixel config specified when the surface was created. * For render targets this can be kUnknown_GrPixelConfig @@ -76,7 +81,8 @@ protected: : INHERITED(gpu) , fConfig(desc.fConfig) , fWidth(desc.fWidth) - , fHeight(desc.fHeight) {} + , fHeight(desc.fHeight) + , fOrigin(desc.fOrigin) {} ~GrSurface() override {} @@ -87,6 +93,7 @@ private: GrPixelConfig fConfig; int fWidth; int fHeight; + GrSurfaceOrigin fOrigin; typedef GrGpuResource INHERITED; }; -- cgit v1.2.3