[cogl/wip/virtual-framebuffer: 25/37] fix: optimize framebuffer state flush



commit c7bc85a952404c382f985c6a72f03d9158d24651
Author: Robert Bragg <robert linux intel com>
Date:   Tue Nov 22 21:27:24 2011 +0000

    fix: optimize framebuffer state flush

 cogl/cogl-framebuffer-private.h |    2 +-
 cogl/cogl-framebuffer.c         |   10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/cogl/cogl-framebuffer-private.h b/cogl/cogl-framebuffer-private.h
index 4becbe8..31864f3 100644
--- a/cogl/cogl-framebuffer-private.h
+++ b/cogl/cogl-framebuffer-private.h
@@ -271,7 +271,7 @@ typedef enum _CoglFramebufferFlushFlags
 void
 _cogl_framebuffer_flush_state (CoglFramebuffer *draw_buffer,
                                CoglFramebuffer *read_buffer,
-                               CoglFramebufferFlushFlags flags);
+                               CoglFramebufferState state);
 
 CoglFramebuffer *
 _cogl_get_read_framebuffer (void);
diff --git a/cogl/cogl-framebuffer.c b/cogl/cogl-framebuffer.c
index 2ff6a2c..fe6e4fc 100644
--- a/cogl/cogl-framebuffer.c
+++ b/cogl/cogl-framebuffer.c
@@ -1501,8 +1501,8 @@ _cogl_framebuffer_flush_viewport_state (CoglFramebuffer *framebuffer)
 static void
 _cogl_framebuffer_flush_clip_state (CoglFramebuffer *framebuffer)
 {
-  _cogl_clip_state_flush (&framebuffer->clip_state,
-                          framebuffer);
+  CoglClipStack *stack = _cogl_clip_state_get_stack (&framebuffer->clip_state);
+  _cogl_clip_stack_flush (stack, framebuffer);
 }
 
 static void
@@ -1523,14 +1523,16 @@ _cogl_framebuffer_flush_dither_state (CoglFramebuffer *framebuffer)
 static void
 _cogl_framebuffer_flush_modelview_state (CoglFramebuffer *framebuffer)
 {
-  _cogl_matrix_stack_flush_to_gl (framebuffer->modelview_stack,
+  _cogl_matrix_stack_flush_to_gl (framebuffer->context,
+                                  framebuffer->modelview_stack,
                                   COGL_MATRIX_MODELVIEW);
 }
 
 static void
 _cogl_framebuffer_flush_projection_state (CoglFramebuffer *framebuffer)
 {
-  _cogl_matrix_stack_flush_to_gl (framebuffer->projection_stack,
+  _cogl_matrix_stack_flush_to_gl (framebuffer->context,
+                                  framebuffer->projection_stack,
                                   COGL_MATRIX_PROJECTION);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]