Chromium Code Reviews| Index: include/gpu/GrTextureProvider.h |
| diff --git a/include/gpu/GrTextureProvider.h b/include/gpu/GrTextureProvider.h |
| index 28fda48c43e87dbf17d033e6fa37d0f62dc68a57..8271abc8ff75f422d4cfab5f8fc1800af706c960 100644 |
| --- a/include/gpu/GrTextureProvider.h |
| +++ b/include/gpu/GrTextureProvider.h |
| @@ -9,6 +9,7 @@ |
| #define GrTextureProvider_DEFINED |
| #include "GrTexture.h" |
| +#include "../core/SkMipMap.h" |
|
scroggo
2015/07/21 14:44:23
Within Skia, we do not fully qualify our includes.
|
| class SK_API GrTextureProvider { |
| public: |
| @@ -29,6 +30,19 @@ public: |
| GrTexture* createTexture(const GrSurfaceDesc& desc, bool budgeted, const void* srcData, |
| size_t rowBytes); |
| + |
| + /** |
| + * Creates a new mipmapped texture in the resource cache and returns it. The |
| + * caller owns a ref on the returned texture which must be balanced by a |
| + * call to unref. |
| + * |
| + * @param desc Description of the texture properties. |
| + * @param budgeted Does the texture count against the resource cache budget? |
| + * @param srcData The mipmip data used to populate the texture. |
| + */ |
| + GrTexture* createMipmappedTexture(const GrSurfaceDesc& desc, bool budgeted, |
| + const SkMipMap& srcData); |
| + |
| /** Shortcut for creating a texture with no initial data to upload. */ |
| GrTexture* createTexture(const GrSurfaceDesc& desc, bool budgeted) { |
| return this->createTexture(desc, budgeted, NULL, 0); |