mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 04:42:14 +00:00
Skip clip flush in _texture_2d_copy_from_framebuffer
Although there was a comment in cogl_texture_2d_copy_from_framebuffer explaining that we shouldn't flush the clip state, the comment was a bit miss-leading implying we were going to explicitly set a NULL clip. Also we weren't actually avoiding flushing the clip state since we were passing 0 for the CoglDrawFlags. We now pass COGL_FRAMEBUFFER_FLUSH_SKIP_CLIP_STATE in to the flags when flushing the framebuffer state and the comment has be updated to explain that clipping won't affect reading from the framebuffer so we don't need to flush it. Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
e2c758c105
commit
89731d160e
@ -581,11 +581,12 @@ _cogl_texture_2d_copy_from_framebuffer (CoglHandle handle,
|
||||
|
||||
tex_2d = COGL_TEXTURE_2D (handle);
|
||||
|
||||
/* Make sure the current framebuffers are bound. We explicitly avoid
|
||||
flushing the clip state so we can bind our own empty state */
|
||||
/* Make sure the current framebuffers are bound, though we don't need to
|
||||
* flush the clip state here since we aren't going to draw to the
|
||||
* framebuffer. */
|
||||
_cogl_framebuffer_flush_state (cogl_get_draw_framebuffer (),
|
||||
_cogl_get_read_framebuffer (),
|
||||
0);
|
||||
COGL_FRAMEBUFFER_FLUSH_SKIP_CLIP_STATE);
|
||||
|
||||
_cogl_bind_gl_texture_transient (GL_TEXTURE_2D,
|
||||
tex_2d->gl_texture,
|
||||
|
Loading…
Reference in New Issue
Block a user