mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
Add _cogl_texture_2d_externally_modified
_cogl_texture_2d_externally_modified is a function specific to the CoglTexture2D texture backend that should be called whenever the contents of the texture are modified without the backend knowing about it. It simply marks the mipmap tree as invalid.
This commit is contained in:
parent
5a5b3914ba
commit
f9f2f6bc6c
@ -67,4 +67,15 @@ _cogl_texture_2d_new_from_bitmap (CoglHandle bmp_handle,
|
||||
CoglTextureFlags flags,
|
||||
CoglPixelFormat internal_format);
|
||||
|
||||
/*
|
||||
* _cogl_texture_2d_externally_modified:
|
||||
* @handle: A handle to a 2D texture
|
||||
*
|
||||
* This should be called whenever the texture is modified other than
|
||||
* by using cogl_texture_set_region. It will cause the mipmaps to be
|
||||
* invalidated
|
||||
*/
|
||||
void
|
||||
_cogl_texture_2d_externally_modified (CoglHandle handle);
|
||||
|
||||
#endif /* __COGL_TEXTURE_2D_H */
|
||||
|
@ -320,6 +320,15 @@ _cogl_texture_2d_new_from_bitmap (CoglHandle bmp_handle,
|
||||
return _cogl_texture_2d_handle_new (tex_2d);
|
||||
}
|
||||
|
||||
void
|
||||
_cogl_texture_2d_externally_modified (CoglHandle handle)
|
||||
{
|
||||
if (!cogl_is_texture_2d (handle))
|
||||
return;
|
||||
|
||||
COGL_TEXTURE_2D (handle)->mipmaps_dirty = TRUE;
|
||||
}
|
||||
|
||||
static int
|
||||
_cogl_texture_2d_get_max_waste (CoglTexture *tex)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user