diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/private/GrRenderTargetProxy.h | 4 | ||||
-rw-r--r-- | include/private/GrSurfaceProxy.h | 8 | ||||
-rw-r--r-- | include/private/GrTextureProxy.h | 2 |
3 files changed, 13 insertions, 1 deletions
diff --git a/include/private/GrRenderTargetProxy.h b/include/private/GrRenderTargetProxy.h index d7c4e06b80..61c3ecb8d7 100644 --- a/include/private/GrRenderTargetProxy.h +++ b/include/private/GrRenderTargetProxy.h @@ -23,7 +23,7 @@ public: const GrRenderTargetProxy* asRenderTargetProxy() const override { return this; } // Actually instantiate the backing rendertarget, if necessary. - bool instantiate(GrResourceProvider* resourceProvider) override; + bool instantiate(GrResourceProvider*) override; GrFSAAType fsaaType() const { if (!fSampleCnt) { @@ -68,6 +68,8 @@ protected: // Wrapped version GrRenderTargetProxy(sk_sp<GrSurface>); + sk_sp<GrSurface> createSurface(GrResourceProvider*) const override; + private: size_t onUninstantiatedGpuMemorySize() const override; diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h index 7aa944793a..f899f75abf 100644 --- a/include/private/GrSurfaceProxy.h +++ b/include/private/GrSurfaceProxy.h @@ -329,6 +329,7 @@ public: bool isWrapped_ForTesting() const; + SkDEBUGCODE(bool isInstantiated() const { return SkToBool(fTarget); }) SkDEBUGCODE(void validate(GrContext*) const;) // Provides access to functions that aren't part of the public API. @@ -367,6 +368,13 @@ protected: return this->internalHasPendingWrite(); } + virtual sk_sp<GrSurface> createSurface(GrResourceProvider*) const = 0; + void assign(sk_sp<GrSurface> surface); + + sk_sp<GrSurface> createSurfaceImpl(GrResourceProvider*, int sampleCnt, + GrSurfaceFlags flags, bool isMipMapped, + SkDestinationSurfaceColorMode mipColorMode) const; + bool instantiateImpl(GrResourceProvider* resourceProvider, int sampleCnt, GrSurfaceFlags flags, bool isMipMapped, SkDestinationSurfaceColorMode mipColorMode); diff --git a/include/private/GrTextureProxy.h b/include/private/GrTextureProxy.h index 2736e61c12..60be19ecef 100644 --- a/include/private/GrTextureProxy.h +++ b/include/private/GrTextureProxy.h @@ -49,6 +49,8 @@ protected: SkDestinationSurfaceColorMode mipColorMode() const { return fMipColorMode; } + sk_sp<GrSurface> createSurface(GrResourceProvider*) const override; + private: bool fIsMipMapped; SkDestinationSurfaceColorMode fMipColorMode; |