framebuffer: Move clear code to cogl-framebuffer.c
authorRobert Bragg <robert@linux.intel.com>
Wed, 5 Jan 2011 15:30:04 +0000 (15:30 +0000)
committerRobert Bragg <robert@linux.intel.com>
Fri, 21 Jan 2011 16:18:09 +0000 (16:18 +0000)
commit131578c13aeeb53d99d7c63a0b2ddaded23524fc
tree47b0550b8f7ed65ee0736f5f80017b17822eba51
parent4ab8a3f0c16b82d4f223de869e1b87279dcff272
framebuffer: Move clear code to cogl-framebuffer.c

This moves the implementation of cogl_clear into cogl-framebuffer.c as
two new internal functions _cogl_framebuffer_clear and
_cogl_framebuffer_clear4f. It's not clear if this is what the API will
look like as we make more of the CoglFramebuffer API public due to the
limitations of using flags to identify buffers when framebuffers may
contain any number of ancillary buffers but conceptually it makes some
sense to tie the operation of clearing a color buffer to a framebuffer.

The short term intention is to enable tracking the current clear color
as a property of the framebuffer as part of an optimization for reading
back single pixels when the geometry is simple enough that we can
compute the result quickly on the CPU. (If the point doesn't intersect
any geometry we'll need to return the last clear color.)
clutter/cogl/cogl/cogl-framebuffer-private.h
clutter/cogl/cogl/cogl-framebuffer.c
clutter/cogl/cogl/cogl.c
clutter/cogl/cogl/cogl2-path.c