tests: Move the create_color_texture function to test-utils

This adds a shared utility function to create a 1x1 texture with a
given color.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
Neil Roberts
2012-02-10 16:57:24 +00:00
parent 39b9e717f5
commit d7164f9579
3 changed files with 30 additions and 21 deletions

View File

@ -101,4 +101,15 @@ test_utils_check_region (int x, int y,
void
test_utils_compare_pixel (const guint8 *screen_pixel, guint32 expected_pixel);
/*
* test_utils_create_color_texture:
* @context: A #CoglContext
* @color: A color to put in the texture
*
* Creates a 1x1-pixel RGBA texture filled with the given color.
*/
CoglTexture *
test_utils_create_color_texture (CoglContext *context,
guint32 color);
#endif /* _TEST_UTILS_H_ */