diff options
Diffstat (limited to 'src/gpu/GrTextureMaker.h')
-rw-r--r-- | src/gpu/GrTextureMaker.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/GrTextureMaker.h b/src/gpu/GrTextureMaker.h index 909d3480bf..9e1e0dd96e 100644 --- a/src/gpu/GrTextureMaker.h +++ b/src/gpu/GrTextureMaker.h @@ -16,6 +16,8 @@ */ class GrTextureMaker : public GrTextureProducer { public: + enum class AllowedTexGenType : bool { kCheap, kAny }; + /** * Returns a texture that is safe for use with the params. If the size of the returned texture * does not match width()/height() then the contents of the original must be scaled to fit @@ -44,9 +46,13 @@ protected: /** * Return the maker's "original" texture. It is the responsibility of the maker to handle any * caching of the original if desired. + * If "genType" argument equals AllowedTexGenType::kCheap and the texture is not trivial to + * construct then refOriginalTextureProxy should return nullptr (for example if texture is made + * by drawing into a render target). */ virtual sk_sp<GrTextureProxy> refOriginalTextureProxy(bool willBeMipped, - SkColorSpace* dstColorSpace) = 0; + SkColorSpace* dstColorSpace, + AllowedTexGenType genType) = 0; /** * Returns the color space of the maker's "original" texture, assuming it was retrieved with |