[cogl] Skip clip flush in _texture_2d_copy_from_framebuffer
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] Skip clip flush in _texture_2d_copy_from_framebuffer
- Date: Thu, 3 Nov 2011 14:00:23 +0000 (UTC)
commit 89731d160eb3fb955a30fc06f65e226e57e39333
Author: Robert Bragg <robert linux intel com>
Date: Thu Nov 3 13:12:47 2011 +0000
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>
cogl/cogl-texture-2d.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/cogl/cogl-texture-2d.c b/cogl/cogl-texture-2d.c
index 61847d4..d83570d 100644
--- a/cogl/cogl-texture-2d.c
+++ b/cogl/cogl-texture-2d.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]