diff options
author | Robert Bragg <robert@linux.intel.com> | 2012-09-19 22:32:25 +0100 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2013-01-22 17:47:59 +0000 |
commit | b1ecfbf720839d2ded5d7fc113903797d15f414c (patch) | |
tree | e175240d9888f831d8ccc859f67b8a9652b887fe /cogl/cogl-attribute.c | |
parent | bcf6a61d0b23a8ca6b1038cd54c8595306d3a34c (diff) | |
download | cogl-b1ecfbf720839d2ded5d7fc113903797d15f414c.tar.gz |
buffer: splits out GL specific code
As part of an on-going effort to be able to support non-opengl drivers
for Cogl this splits out the opengl specific code from cogl-buffer.c
into driver/gl/cogl-buffer-gl.c
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 4d7094a979ff2cbbe4054f4a44ca05fc41a9e447)
Diffstat (limited to 'cogl/cogl-attribute.c')
-rw-r--r-- | 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 ff0549b5..ad68ff63 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); } |