Chromium Code Reviews| Index: src/gpu/SkGrPriv.h |
| diff --git a/src/gpu/SkGrPriv.h b/src/gpu/SkGrPriv.h |
| index 1564d31bc936c1b39447a8cd4e7cf9dd7f366cfd..25fda57d9ec8668ec8781fcbf1b5e5e0e2bb3528 100644 |
| --- a/src/gpu/SkGrPriv.h |
| +++ b/src/gpu/SkGrPriv.h |
| @@ -9,6 +9,7 @@ |
| #define SkGrPriv_DEFINED |
| #include "GrTypes.h" |
| +#include "GrTextureAccess.h" |
| #include "SkImageInfo.h" |
| #include "SkXfermode.h" |
| @@ -31,6 +32,8 @@ struct SkGrStretch { |
| int fHeight; |
| }; |
| +GrTextureParams GrImageUsageToTextureParams(SkImageUsageType); |
| + |
| /** |
| * Our key includes the offset, width, and height so that bitmaps created by extractSubset() |
| * are unique. |
| @@ -45,6 +48,11 @@ struct SkGrStretch { |
| void GrMakeKeyFromImageID(GrUniqueKey* key, uint32_t imageID, const SkIRect& imageBounds, |
| const GrCaps&, SkImageUsageType); |
| +/** |
| + * Given an "unstretched" key, and a stretch rec, produce a stretched key. |
|
robertphillips
2015/09/30 19:25:56
Returns false if the stretched key cannot be creat
|
| + */ |
| +bool GrMakeStretchedKey(const GrUniqueKey& origKey, const SkGrStretch&, GrUniqueKey* stretchedKey); |
| + |
| /** Converts an SkPaint to a GrPaint for a given GrContext. The matrix is required in order |
| to convert the SkShader (if any) on the SkPaint. */ |
| bool SkPaintToGrPaint(GrContext*, |
| @@ -76,4 +84,6 @@ bool SkPaintToGrPaintWithXfermode(GrContext* context, |
| bool primitiveIsSrc, |
| GrPaint* grPaint); |
| +bool GrTextureUsageSupported(const GrCaps&, int width, int height, SkImageUsageType); |
| + |
| #endif |