mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05: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
4ac3133208
commit
8ebf76a9a9
@ -670,8 +670,6 @@ _cogl_atlas_texture_migrate (unsigned int n_textures,
|
||||
unsigned int i;
|
||||
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
|
||||
* journal that depend on the current underlying GL texture storage
|
||||
* so we flush the journal before migrating.
|
||||
@ -681,6 +679,8 @@ _cogl_atlas_texture_migrate (unsigned int n_textures,
|
||||
*/
|
||||
_cogl_journal_flush ();
|
||||
|
||||
_cogl_atlas_texture_blit_begin (&blit_data, new_texture, old_texture);
|
||||
|
||||
for (i = 0; i < n_textures; i++)
|
||||
{
|
||||
/* Skip the texture that is being added because it doesn't contain
|
||||
|
Loading…
Reference in New Issue
Block a user