aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrGpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrGpu.h')
-rw-r--r--src/gpu/GrGpu.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 5b4c05a0fd..5d35fcf859 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -96,13 +96,22 @@ public:
const SkTArray<GrMipLevel>& texels);
/**
- * Simplified createTexture() interface when there is no initial texel data
- * to upload.
+ * 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) {
- return this->createTexture(desc, budgeted, SkTArray<GrMipLevel>());
- }
-
+ GrTexture* createTexture(const GrSurfaceDesc& desc, SkBudgeted budgeted,
+ const void* srcData, size_t rowBytes);
+
/**
* Implements GrTextureProvider::wrapBackendTexture
*/