Index: src/gpu/GrGpu.h |
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h |
index 5b4c05a0fd6b86d46d534d4743c5ef9fe1d15baa..5d35fcf859bca3792681e9e6ff5037e92fc9fdf0 100644 |
--- a/src/gpu/GrGpu.h |
+++ b/src/gpu/GrGpu.h |
@@ -96,13 +96,22 @@ |
const SkTArray<GrMipLevel>& texels); |
/** |
- * Simplified createTexture() interface when there is no initial texel data |
- * to upload. |
- */ |
- GrTexture* createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted) { |
- return this->createTexture(desc, budgeted, SkTArray<GrMipLevel>()); |
- } |
- |
+ * This function is a shim which creates a SkTArGrMipLevell> of size 1. |
+ * It then calls createTexture with that SkTArray. |
+ * |
+ * @param srcData texel data to load texture. Begins with full-size |
+ * palette data for paletted texture. For compressed |
+ * formats it contains the compressed pixel data. Otherwise, |
+ * it contains width*height texels. If nullptr texture data |
+ * is uninitialized. |
+ * @param rowBytes the number of bytes between consecutive rows. Zero |
+ * means rows are tightly packed. This field is ignored |
+ * for compressed pixel formats. |
+ * @return The texture object if successful, otherwise, nullptr. |
+ */ |
+ GrTexture* createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted, |
+ const void* srcData, size_t rowBytes); |
+ |
/** |
* Implements GrTextureProvider::wrapBackendTexture |
*/ |