diff options
Diffstat (limited to 'include/gpu/GrSurfaceContext.h')
-rw-r--r-- | include/gpu/GrSurfaceContext.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/gpu/GrSurfaceContext.h b/include/gpu/GrSurfaceContext.h index 6a40f2f8b2..75ee95276e 100644 --- a/include/gpu/GrSurfaceContext.h +++ b/include/gpu/GrSurfaceContext.h @@ -14,6 +14,7 @@ class GrAuditTrail; class GrContext; +class GrRenderTargetContext; class GrRenderTargetProxy; class GrSingleOwner; class GrSurface; @@ -34,6 +35,10 @@ public: sk_sp<SkColorSpace> refColorSpace() const { return fColorSpace; } bool isGammaCorrect() const { return SkToBool(fColorSpace.get()); } + // TODO: these two calls would be way cooler if this object had a GrSurfaceProxy pointer + int width() const { return this->asDeferredSurface()->width(); } + int height() const { return this->asDeferredSurface()->height(); } + /* * Copy 'src' into the proxy backing this context * @param src src of pixels @@ -91,9 +96,12 @@ public: // TODO: this is virtual b.c. this object doesn't have a pointer to the wrapped GrSurfaceProxy? virtual GrSurfaceProxy* asDeferredSurface() = 0; + virtual const GrSurfaceProxy* asDeferredSurface() const = 0; virtual GrTextureProxy* asDeferredTexture() = 0; virtual GrRenderTargetProxy* asDeferredRenderTarget() = 0; + virtual GrRenderTargetContext* asRenderTargetContext() { return nullptr; } + GrAuditTrail* auditTrail() { return fAuditTrail; } // Provides access to functions that aren't part of the public API. |