test: use correct enum

The function create_texture() in test-wrap-modes.c takes a
TestUtilsTextureFlags. However a CoglTextureFlags is passed instead
in two calls. As the enums are identical this patch changes it to
use the TestUtils type.

The enum definitions:

typedef enum
{
  COGL_TEXTURE_NONE           = 0,
  COGL_TEXTURE_NO_AUTO_MIPMAP = 1 << 0,
  COGL_TEXTURE_NO_SLICING     = 1 << 1,
  COGL_TEXTURE_NO_ATLAS       = 1 << 2
} CoglTextureFlags;

typedef enum
{
  TEST_UTILS_TEXTURE_NONE           = 0,
  TEST_UTILS_TEXTURE_NO_AUTO_MIPMAP = 1 << 0,
  TEST_UTILS_TEXTURE_NO_SLICING     = 1 << 1,
  TEST_UTILS_TEXTURE_NO_ATLAS       = 1 << 2
} TestUtilsTextureFlags;

https://gitlab.gnome.org/GNOME/mutter/merge_requests/938
This commit is contained in:
Thomas Hindoe Paaboel Andersen 2019-11-15 23:58:14 +01:00
parent d48fec8855
commit d3afe4308a

View File

@ -253,7 +253,7 @@ paint (TestState *state)
cogl_object_unref (state->texture); cogl_object_unref (state->texture);
/* Draw the tests using cogl_polygon */ /* Draw the tests using cogl_polygon */
state->texture = create_texture (COGL_TEXTURE_NO_ATLAS); state->texture = create_texture (TEST_UTILS_TEXTURE_NO_ATLAS);
cogl_push_matrix (); cogl_push_matrix ();
cogl_translate (0.0f, TEX_SIZE * 4.0f, 0.0f); cogl_translate (0.0f, TEX_SIZE * 4.0f, 0.0f);
draw_tests_polygon (state); draw_tests_polygon (state);
@ -261,7 +261,7 @@ paint (TestState *state)
cogl_object_unref (state->texture); cogl_object_unref (state->texture);
/* Draw the tests using a vertex buffer */ /* Draw the tests using a vertex buffer */
state->texture = create_texture (COGL_TEXTURE_NO_ATLAS); state->texture = create_texture (TEST_UTILS_TEXTURE_NO_ATLAS);
cogl_push_matrix (); cogl_push_matrix ();
cogl_translate (0.0f, TEX_SIZE * 6.0f, 0.0f); cogl_translate (0.0f, TEX_SIZE * 6.0f, 0.0f);
draw_tests_vbo (state); draw_tests_vbo (state);