| Index: include/gpu/GrTextureProvider.h
|
| diff --git a/include/gpu/GrTextureProvider.h b/include/gpu/GrTextureProvider.h
|
| index 44c8cbc6578424aaed6a0e3422d9e4915597ee6e..76882fef4268a6b576c43dcc0b3aca569d2a8d4d 100644
|
| --- a/include/gpu/GrTextureProvider.h
|
| +++ b/include/gpu/GrTextureProvider.h
|
| @@ -69,6 +69,21 @@ public:
|
| */
|
| GrTexture* createApproxTexture(const GrSurfaceDesc&);
|
|
|
| + enum SizeConstraint {
|
| + kExact_SizeConstraint,
|
| + kApprox_SizeConstraint,
|
| + };
|
| +
|
| + GrTexture* createTexture(const GrSurfaceDesc& desc, SizeConstraint constraint) {
|
| + switch (constraint) {
|
| + case kExact_SizeConstraint:
|
| + return this->createTexture(desc, true);
|
| + case kApprox_SizeConstraint:
|
| + return this->createApproxTexture(desc);
|
| + }
|
| + sk_throw();
|
| + }
|
| +
|
| /** Legacy function that no longer should be used. */
|
| enum ScratchTexMatch {
|
| kExact_ScratchTexMatch,
|
|
|