[cogl/wip/cogl-1.14: 39/50] fix: attribute: Split out GL specific code



commit f87838f5930c035ffa9425a98add6712921d95d1
Author: Robert Bragg <robert linux intel com>
Date:   Fri Jan 4 19:56:25 2013 +0000

    fix: attribute: Split out GL specific code

 cogl/cogl-attribute.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/cogl/cogl-attribute.c b/cogl/cogl-attribute.c
index ff0549b..ad68ff6 100644
--- a/cogl/cogl-attribute.c
+++ b/cogl/cogl-attribute.c
@@ -384,6 +384,7 @@ _cogl_flush_attributes_state (CoglFramebuffer *framebuffer,
 {
   CoglContext *ctx = framebuffer->context;
   CoglFlushLayerState layers_state;
+  CoglPipeline *copy = NULL;
 
   if (!(flags & COGL_DRAW_SKIP_JOURNAL_FLUSH))
     _cogl_journal_flush (framebuffer->journal);
@@ -418,12 +419,8 @@ _cogl_flush_attributes_state (CoglFramebuffer *framebuffer,
       G_UNLIKELY (ctx->legacy_state_set) &&
       _cogl_get_enable_legacy_state ())
     {
-      /* If we haven't already created a derived pipeline... */
-      if (!copy)
-        {
-          copy = cogl_pipeline_copy (pipeline);
-          pipeline = copy;
-        }
+      copy = cogl_pipeline_copy (pipeline);
+      pipeline = copy;
       _cogl_pipeline_apply_legacy_state (pipeline);
     }
 



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