diff options
Diffstat (limited to 'include/private/GrSurfaceProxy.h')
-rw-r--r-- | include/private/GrSurfaceProxy.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h index 539aaf65aa..1e846c5223 100644 --- a/include/private/GrSurfaceProxy.h +++ b/include/private/GrSurfaceProxy.h @@ -12,10 +12,12 @@ #include "GrSurface.h" #include "SkRect.h" +class GrCaps; class GrOpList; class GrTextureProvider; class GrTextureProxy; class GrRenderTargetProxy; +class GrTextureProvider; // This class replicates the functionality GrIORef<GrSurface> but tracks the // utilitization for later resource allocation (for the deferred case) and @@ -75,6 +77,17 @@ protected: class GrSurfaceProxy : public GrIORefProxy { public: + static sk_sp<GrSurfaceProxy> MakeWrapped(sk_sp<GrSurface>); + + static sk_sp<GrSurfaceProxy> MakeDeferred(const GrCaps&, const GrSurfaceDesc&, + SkBackingFit, SkBudgeted); + + // TODO: need to refine ownership semantics of 'srcData' if we're in completely + // deferred mode + static sk_sp<GrSurfaceProxy> MakeDeferred(const GrCaps&, GrTextureProvider*, + const GrSurfaceDesc&, SkBudgeted, + const void* srcData, size_t rowBytes); + const GrSurfaceDesc& desc() const { return fDesc; } GrSurfaceOrigin origin() const { @@ -88,6 +101,8 @@ public: uint32_t uniqueID() const { return fUniqueID; } + GrSurface* instantiate(GrTextureProvider* texProvider); + /** * Helper that gets the width and height of the surface as a bounding rectangle. */ @@ -146,8 +161,6 @@ protected: virtual ~GrSurfaceProxy(); - GrSurface* instantiate(GrTextureProvider* texProvider); - // For wrapped resources, 'fDesc' will always be filled in from the wrapped resource. const GrSurfaceDesc fDesc; const SkBackingFit fFit; // always exact for wrapped resources |