Index: src/gpu/GrGpu.h |
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h |
index 11f87e0458d9b0b8b0aa3cd386ee7363d4a6028c..f2d0618d6016b0c35d097b2ceef18f72b466f0e1 100644 |
--- a/src/gpu/GrGpu.h |
+++ b/src/gpu/GrGpu.h |
@@ -87,6 +87,23 @@ public: |
const void* srcData, size_t rowBytes); |
/** |
+ * Creates a compressed texture object. If desc width or height is not a power of |
+ * two but underlying API requires a power of two texture then this function will |
+ * return NULL. |
+ * |
+ * The kRenderTarget_TextureFlag should not be specified |
+ * |
+ * @param desc describes the texture to be created. |
robertphillips
2014/05/27 22:01:50
Mention its compressedness ?
krajcevski
2014/05/27 22:19:29
Done.
|
+ * @param srcData texel data to load texture. The size of the data is expected |
+ * to be large enough to hold as much data as the format expects |
+ * with respect to the width and height. |
robertphillips
2014/05/27 22:01:50
format ?
krajcevski
2014/05/27 22:19:29
Done.
krajcevski
2014/05/27 22:19:29
Done.
|
+ * |
+ * @return The texture object if successful, otherwise NULL. |
+ */ |
+ GrTexture* createCompressedTexture(const GrTextureDesc& desc, |
+ const void* srcData, GrCompressedFormat format); |
+ |
+ /** |
* Implements GrContext::wrapBackendTexture |
*/ |
GrTexture* wrapBackendTexture(const GrBackendTextureDesc&); |
@@ -414,6 +431,9 @@ private: |
virtual GrTexture* onCreateTexture(const GrTextureDesc& desc, |
const void* srcData, |
size_t rowBytes) = 0; |
+ virtual GrTexture* onCreateCompressedTexture(const GrTextureDesc& desc, |
+ const void* srcData, |
+ GrCompressedFormat format) = 0; |
virtual GrTexture* onWrapBackendTexture(const GrBackendTextureDesc&) = 0; |
virtual GrRenderTarget* onWrapBackendRenderTarget(const GrBackendRenderTargetDesc&) = 0; |
virtual GrVertexBuffer* onCreateVertexBuffer(size_t size, bool dynamic) = 0; |