diff options
author | 2018-07-13 13:24:05 -0400 | |
---|---|---|
committer | 2018-07-13 18:38:14 +0000 | |
commit | 36848f6b30ddaca461c98e13b9976b2c449ca547 (patch) | |
tree | ed1626f12d90a0f8f154c2b89fb938f64c8ed499 /tests/TestUtils.h | |
parent | 81d151103faca621cfe62c9dfbec842ec9f337c4 (diff) |
implemented metal gpu backend texture upload testing
Bug: skia:
Change-Id: Ia3af58a0710f7f9792b37682a3cc45dd14282b71
Reviewed-on: https://skia-review.googlesource.com/140248
Commit-Queue: Timothy Liang <timliang@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests/TestUtils.h')
-rw-r--r-- | tests/TestUtils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/TestUtils.h b/tests/TestUtils.h index 1fe96bff7c..e89193195b 100644 --- a/tests/TestUtils.h +++ b/tests/TestUtils.h @@ -9,6 +9,7 @@ class GrSurfaceContext; class GrSurfaceProxy; +typedef uint32_t GrColor; // Ensure that reading back from 'srcContext' as RGBA 8888 matches 'expectedPixelValues void test_read_pixels(skiatest::Reporter*, @@ -29,3 +30,10 @@ void test_copy_from_surface(skiatest::Reporter*, GrContext*, // Ensure that RGBA 8888 pixels can be copied into 'dstContext' void test_copy_to_surface(skiatest::Reporter*, GrProxyProvider*, GrSurfaceContext* dstContext, const char* testName); + +// Fills data with a red-green gradient +void fill_pixel_data(int width, int height, GrColor* data); + +// Checks srcBuffer and dstBuffer contain the same colors +bool does_full_buffer_contain_correct_color(GrColor* srcBuffer, GrColor* dstBuffer, int width, + int height); |