Add rowBytes to createTestingOnlyBackendTexture
This is pulled out of:
https://skia-review.googlesource.com/c/skia/+/151983 (Test YUV images in DDL)
The YUV images seem to like to have row padding.
Change-Id: I517d2b63678beeafef88f86148fca15862176780
Reviewed-on: https://skia-review.googlesource.com/156367
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 783537a..a5beb9e 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -339,16 +339,17 @@
void dumpJSON(SkJSONWriter*) const;
#if GR_TEST_UTILS
+ GrBackendTexture createTestingOnlyBackendTexture(const void* pixels, int w, int h,
+ SkColorType, bool isRenderTarget,
+ GrMipMapped, size_t rowBytes = 0);
+
/** Creates a texture directly in the backend API without wrapping it in a GrTexture. This is
only to be used for testing (particularly for testing the methods that import an externally
created texture into Skia. Must be matched with a call to deleteTestingOnlyTexture(). */
- GrBackendTexture createTestingOnlyBackendTexture(const void* pixels, int w, int h, SkColorType,
- bool isRenderTarget, GrMipMapped);
- /** Older version based on GrPixelConfig. Currently the preferred one above devolves to this. */
virtual GrBackendTexture createTestingOnlyBackendTexture(const void* pixels, int w, int h,
- GrPixelConfig config,
- bool isRenderTarget,
- GrMipMapped mipMapped) = 0;
+ GrColorType, bool isRenderTarget,
+ GrMipMapped, size_t rowBytes = 0) = 0;
+
/** Check a handle represents an actual texture in the backend API that has not been freed. */
virtual bool isTestingOnlyBackendTexture(const GrBackendTexture&) const = 0;
/**