mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 14:53:03 +00:00
cogl-atlas-texture: Flush the journal before starting blit not after
_cogl_atlas_texture_blit_begin binds a texture to use as the destination and it expects it to stay bound until _cogl_atlas_texture_end_blit is called. However there was a call to _cogl_journal_flush directly after setting up the blit state which could cause the wrong texture to be bound. This just moves the flush to before the call to _cogl_atlas_texture_blit_begin. This was breaking test-cogl-sub-texture.
This commit is contained in:
parent
413e631f48
commit
8cee3c8670
@ -670,8 +670,6 @@ _cogl_atlas_texture_migrate (unsigned int n_textures,
|
|||||||
unsigned int i;
|
unsigned int i;
|
||||||
CoglAtlasTextureBlitData blit_data;
|
CoglAtlasTextureBlitData blit_data;
|
||||||
|
|
||||||
_cogl_atlas_texture_blit_begin (&blit_data, new_texture, old_texture);
|
|
||||||
|
|
||||||
/* We don't know if any materials may currently be referenced in the
|
/* We don't know if any materials may currently be referenced in the
|
||||||
* journal that depend on the current underlying GL texture storage
|
* journal that depend on the current underlying GL texture storage
|
||||||
* so we flush the journal before migrating.
|
* so we flush the journal before migrating.
|
||||||
@ -681,6 +679,8 @@ _cogl_atlas_texture_migrate (unsigned int n_textures,
|
|||||||
*/
|
*/
|
||||||
_cogl_journal_flush ();
|
_cogl_journal_flush ();
|
||||||
|
|
||||||
|
_cogl_atlas_texture_blit_begin (&blit_data, new_texture, old_texture);
|
||||||
|
|
||||||
for (i = 0; i < n_textures; i++)
|
for (i = 0; i < n_textures; i++)
|
||||||
{
|
{
|
||||||
/* Skip the texture that is being added because it doesn't contain
|
/* Skip the texture that is being added because it doesn't contain
|
||||||
|
Loading…
x
Reference in New Issue
Block a user