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)
This commit is contained in:
Robert Bragg
2012-09-19 22:32:25 +01:00
parent bcf6a61d0b
commit b1ecfbf720
14 changed files with 419 additions and 260 deletions

View File

@ -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);
}