framebuffer: expose experimental cogl_get_draw_framebuffer

This renames the two internal functions _cogl_get_draw/read_buffer
as cogl_get_draw_framebuffer and _cogl_get_read_framebuffer. The
former is now also exposed as experimental API.
This commit is contained in:
Robert Bragg 2011-03-10 21:33:31 +00:00
parent aa1e45267b
commit 0b45110302
14 changed files with 70 additions and 70 deletions

View File

@ -480,7 +480,7 @@ enable_gl_state (CoglDrawFlags flags,
CoglAttribute **attributes,
ValidateLayerState *state)
{
CoglFramebuffer *framebuffer = _cogl_get_draw_buffer ();
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
int i;
#ifdef MAY_HAVE_PROGRAMABLE_GL
GLuint generic_index = 0;
@ -1066,7 +1066,7 @@ flush_state (CoglDrawFlags flags,
{
if (!(flags & COGL_DRAW_SKIP_JOURNAL_FLUSH))
{
CoglFramebuffer *framebuffer = _cogl_get_draw_buffer ();
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
_cogl_journal_flush (framebuffer->journal, framebuffer);
}
@ -1086,8 +1086,8 @@ flush_state (CoglDrawFlags flags,
* stack can cause some drawing which would change the array
* pointers. */
if (!(flags & COGL_DRAW_SKIP_FRAMEBUFFER_FLUSH))
_cogl_framebuffer_flush_state (_cogl_get_draw_buffer (),
_cogl_get_read_buffer (),
_cogl_framebuffer_flush_state (cogl_get_draw_framebuffer (),
_cogl_get_read_framebuffer (),
0);
}

View File

@ -77,7 +77,7 @@ set_clip_plane (GLint plane_num,
GLdouble plane[4];
#endif
GLfloat angle;
CoglFramebuffer *framebuffer = _cogl_get_draw_buffer ();
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (framebuffer);
CoglMatrixStack *projection_stack =
@ -131,7 +131,7 @@ set_clip_planes (float x_1,
float x_2,
float y_2)
{
CoglFramebuffer *framebuffer = _cogl_get_draw_buffer ();
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (framebuffer);
CoglMatrix modelview_matrix;
@ -192,7 +192,7 @@ add_stencil_clip_rectangle (float x_1,
float y_2,
gboolean first)
{
CoglFramebuffer *framebuffer = _cogl_get_draw_buffer ();
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (framebuffer);
CoglMatrixStack *projection_stack =
@ -598,7 +598,7 @@ _cogl_clip_stack_flush (CoglClipStack *stack)
ctx->current_clip_stack = _cogl_clip_stack_ref (stack);
modelview_stack =
_cogl_framebuffer_get_modelview_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_modelview_stack (cogl_get_draw_framebuffer ());
has_clip_planes = cogl_features_available (COGL_FEATURE_FOUR_CLIP_PLANES);
@ -629,7 +629,7 @@ _cogl_clip_stack_flush (CoglClipStack *stack)
scissor_x0 = scissor_y0 = scissor_x1 = scissor_y1 = scissor_y_start = 0;
else
{
CoglFramebuffer *framebuffer = _cogl_get_draw_buffer ();
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
/* We store the entry coordinates in Cogl coordinate space
* but OpenGL requires the window origin to be the bottom

View File

@ -51,7 +51,7 @@ cogl_clip_push_window_rectangle (int x_offset,
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
clip_state = _cogl_framebuffer_get_clip_state (framebuffer);
clip_state->stacks->data =
@ -82,7 +82,7 @@ cogl_clip_push_rectangle (float x_1,
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
clip_state = _cogl_framebuffer_get_clip_state (framebuffer);
cogl_get_modelview_matrix (&modelview_matrix);
@ -139,7 +139,7 @@ cogl_clip_pop (void)
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
clip_state = _cogl_framebuffer_get_clip_state (framebuffer);
_cogl_clip_pop_real (clip_state);
@ -157,7 +157,7 @@ _cogl_clip_state_flush (CoglClipState *clip_state)
void
cogl_clip_ensure (void)
{
CoglFramebuffer *framebuffer = _cogl_get_draw_buffer ();
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
CoglClipState *clip_state;
clip_state = _cogl_framebuffer_get_clip_state (framebuffer);
@ -183,7 +183,7 @@ cogl_clip_stack_save (void)
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
clip_state = _cogl_framebuffer_get_clip_state (framebuffer);
_cogl_clip_stack_save_real (clip_state);
@ -213,7 +213,7 @@ cogl_clip_stack_restore (void)
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
clip_state = _cogl_framebuffer_get_clip_state (framebuffer);
_cogl_clip_stack_restore_real (clip_state);

View File

@ -241,10 +241,7 @@ CoglHandle
_cogl_onscreen_new (void);
CoglFramebuffer *
_cogl_get_draw_buffer (void);
CoglFramebuffer *
_cogl_get_read_buffer (void);
_cogl_get_read_framebuffer (void);
GSList *
_cogl_create_framebuffer_stack (void);

View File

@ -513,7 +513,7 @@ _cogl_framebuffer_set_viewport (CoglFramebuffer *framebuffer,
framebuffer->viewport_width = width;
framebuffer->viewport_height = height;
if (framebuffer->context && _cogl_get_draw_buffer () == framebuffer)
if (framebuffer->context && cogl_get_draw_framebuffer () == framebuffer)
framebuffer->context->dirty_gl_viewport = TRUE;
}
@ -1105,8 +1105,8 @@ _cogl_set_framebuffers (CoglFramebuffer *draw_buffer,
g_return_if_fail (_cogl_is_framebuffer (draw_buffer));
g_return_if_fail (_cogl_is_framebuffer (read_buffer));
current_draw_buffer = _cogl_get_draw_buffer ();
current_read_buffer = _cogl_get_read_buffer ();
current_draw_buffer = cogl_get_draw_framebuffer ();
current_read_buffer = _cogl_get_read_framebuffer ();
if (current_draw_buffer != draw_buffer ||
current_read_buffer != read_buffer)
@ -1147,7 +1147,7 @@ cogl_set_draw_buffer (CoglBufferTarget target, CoglHandle handle)
}
CoglFramebuffer *
_cogl_get_draw_buffer (void)
cogl_get_draw_framebuffer (void)
{
CoglFramebufferStackEntry *entry;
@ -1161,7 +1161,7 @@ _cogl_get_draw_buffer (void)
}
CoglFramebuffer *
_cogl_get_read_buffer (void)
_cogl_get_read_framebuffer (void)
{
CoglFramebufferStackEntry *entry;
@ -1192,8 +1192,8 @@ _cogl_push_framebuffers (CoglFramebuffer *draw_buffer,
/* Copy the top of the stack so that when we call cogl_set_framebuffer
it will still know what the old framebuffer was */
old_draw_buffer = cogl_object_ref (_cogl_get_draw_buffer ());
old_read_buffer = cogl_object_ref (_cogl_get_read_buffer ());
old_draw_buffer = cogl_object_ref (cogl_get_draw_framebuffer ());
old_read_buffer = cogl_object_ref (_cogl_get_read_framebuffer ());
ctx->framebuffer_stack =
g_slist_prepend (ctx->framebuffer_stack,
create_stack_entry (old_draw_buffer,
@ -1212,7 +1212,7 @@ cogl_push_framebuffer (CoglFramebuffer *buffer)
void
cogl_push_draw_buffer (void)
{
cogl_push_framebuffer (_cogl_get_draw_buffer ());
cogl_push_framebuffer (cogl_get_draw_framebuffer ());
}
void
@ -1455,8 +1455,8 @@ _cogl_blit_framebuffer (unsigned int src_x,
CoglFramebuffer *read_buffer;
CoglContext *ctx;
draw_buffer = _cogl_get_draw_buffer ();
read_buffer = _cogl_get_read_buffer ();
draw_buffer = cogl_get_draw_framebuffer ();
read_buffer = _cogl_get_read_framebuffer ();
ctx = draw_buffer->context;
g_return_if_fail (cogl_features_available (COGL_FEATURE_OFFSCREEN_BLIT));
@ -1470,8 +1470,8 @@ _cogl_blit_framebuffer (unsigned int src_x,
/* Make sure the current framebuffers are bound. We explicitly avoid
flushing the clip state so we can bind our own empty state */
_cogl_framebuffer_flush_state (_cogl_get_draw_buffer (),
_cogl_get_read_buffer (),
_cogl_framebuffer_flush_state (cogl_get_draw_framebuffer (),
_cogl_get_read_framebuffer (),
COGL_FRAMEBUFFER_FLUSH_SKIP_CLIP_STATE);
/* Flush any empty clip stack because glBlitFramebuffer is affected

View File

@ -1519,7 +1519,7 @@ _cogl_journal_log_quad (CoglJournal *journal,
entry->pipeline = _cogl_pipeline_journal_ref (source);
clip_stack = _cogl_framebuffer_get_clip_stack (_cogl_get_draw_buffer ());
clip_stack = _cogl_framebuffer_get_clip_stack (cogl_get_draw_framebuffer ());
entry->clip_stack = _cogl_clip_stack_ref (clip_stack);
if (G_UNLIKELY (source != pipeline))
@ -1529,7 +1529,7 @@ _cogl_journal_log_quad (CoglJournal *journal,
_cogl_pipeline_foreach_layer_internal (pipeline,
add_framebuffer_deps_cb,
_cogl_get_draw_buffer ());
cogl_get_draw_framebuffer ());
/* XXX: It doesn't feel very nice that in this case we just assume
* that the journal is associated with the current framebuffer. I
@ -1537,7 +1537,7 @@ _cogl_journal_log_quad (CoglJournal *journal,
* the reason we don't have that currently is that it would
* introduce a circular reference. */
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_DISABLE_BATCHING)))
_cogl_framebuffer_flush_journal (_cogl_get_draw_buffer ());
_cogl_framebuffer_flush_journal (cogl_get_draw_framebuffer ());
COGL_TIMER_STOP (_cogl_uprof_context, log_timer);
}
@ -1588,7 +1588,7 @@ entry_to_screen_polygon (const CoglJournalEntry *entry,
4 /* n_points */);
projection_stack =
_cogl_framebuffer_get_projection_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_projection_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_get (projection_stack, &projection);
cogl_matrix_project_points (&projection,
@ -1600,7 +1600,7 @@ entry_to_screen_polygon (const CoglJournalEntry *entry,
poly, /* points_out */
4 /* n_points */);
_cogl_framebuffer_get_viewport4fv (_cogl_get_draw_buffer (),
_cogl_framebuffer_get_viewport4fv (cogl_get_draw_framebuffer (),
viewport);
/* Scale from OpenGL normalized device coordinates (ranging from -1 to 1)

View File

@ -434,7 +434,7 @@ _cogl_matrix_stack_prepare_for_flush (CoglMatrixStack *stack,
* always render upside down to offscreen buffers.
*/
if (mode == COGL_MATRIX_PROJECTION &&
cogl_is_offscreen (_cogl_get_draw_buffer ()))
cogl_is_offscreen (cogl_get_draw_framebuffer ()))
{
CoglMatrix flipped_projection;
CoglMatrix *projection =

View File

@ -78,7 +78,7 @@ log_quad_sub_textures_cb (CoglHandle texture_handle,
void *user_data)
{
TextureSlicedQuadState *state = user_data;
CoglFramebuffer *framebuffer = _cogl_get_draw_buffer ();
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
CoglHandle texture_override;
float quad_coords[4];
@ -542,7 +542,7 @@ _cogl_multitexture_quad_single_primitive (const float *position,
if (state.override_pipeline)
pipeline = state.override_pipeline;
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
_cogl_journal_log_quad (framebuffer->journal,
position,
pipeline,

View File

@ -459,8 +459,8 @@ _cogl_texture_2d_copy_from_framebuffer (CoglHandle handle,
/* Make sure the current framebuffers are bound. We explicitly avoid
flushing the clip state so we can bind our own empty state */
_cogl_framebuffer_flush_state (_cogl_get_draw_buffer (),
_cogl_get_read_buffer (),
_cogl_framebuffer_flush_state (cogl_get_draw_framebuffer (),
_cogl_get_read_framebuffer (),
0);
_cogl_bind_gl_texture_transient (GL_TEXTURE_2D,

View File

@ -1048,7 +1048,7 @@ _cogl_texture_draw_and_read (CoglHandle handle,
bpp = _cogl_get_format_bpp (COGL_PIXEL_FORMAT_RGBA_8888);
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
/* Viewport needs to have some size and be inside the window for this */
_cogl_framebuffer_get_viewport4fv (framebuffer, viewport);
if (viewport[0] < 0 || viewport[1] < 0 ||

View File

@ -151,7 +151,7 @@ cogl_check_extension (const char *name, const char *ext)
void
cogl_clear (const CoglColor *color, unsigned long buffers)
{
_cogl_framebuffer_clear (_cogl_get_draw_buffer (), buffers, color);
_cogl_framebuffer_clear (cogl_get_draw_framebuffer (), buffers, color);
}
static gboolean
@ -282,7 +282,7 @@ cogl_set_backface_culling_enabled (gboolean setting)
return;
/* Currently the journal can't track changes to backface culling state... */
_cogl_framebuffer_flush_journal (_cogl_get_draw_buffer ());
_cogl_framebuffer_flush_journal (cogl_get_draw_framebuffer ());
ctx->enable_backface_culling = setting;
}
@ -311,7 +311,7 @@ _cogl_flush_face_winding (void)
* all offscreen rendering is done upside down resulting in reversed winding
* for all triangles.
*/
if (cogl_is_offscreen (_cogl_get_draw_buffer ()))
if (cogl_is_offscreen (cogl_get_draw_framebuffer ()))
winding = COGL_FRONT_WINDING_CLOCKWISE;
else
winding = COGL_FRONT_WINDING_COUNTER_CLOCKWISE;
@ -360,7 +360,7 @@ cogl_set_viewport (int x,
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
_cogl_framebuffer_set_viewport (framebuffer,
x,
@ -413,7 +413,7 @@ cogl_get_viewport (float viewport[4])
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
_cogl_framebuffer_get_viewport4fv (framebuffer, viewport);
}
@ -425,7 +425,7 @@ cogl_get_bitmasks (int *red,
{
CoglFramebuffer *framebuffer;
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
if (red)
*red = _cogl_framebuffer_get_red_bits (framebuffer);
@ -492,7 +492,7 @@ _cogl_read_pixels_with_rowstride (int x,
guint8 *pixels,
int rowstride)
{
CoglFramebuffer *framebuffer = _cogl_get_read_buffer ();
CoglFramebuffer *framebuffer = _cogl_get_read_framebuffer ();
int framebuffer_height;
int bpp;
CoglBitmap *bmp;
@ -532,7 +532,7 @@ _cogl_read_pixels_with_rowstride (int x,
*/
cogl_flush ();
_cogl_framebuffer_flush_state (_cogl_get_draw_buffer (),
_cogl_framebuffer_flush_state (cogl_get_draw_framebuffer (),
framebuffer,
0);
@ -703,8 +703,8 @@ cogl_begin_gl (void)
* NB: _cogl_framebuffer_flush_state may disrupt various state (such
* as the pipeline state) when flushing the clip stack, so should
* always be done first when preparing to draw. */
_cogl_framebuffer_flush_state (_cogl_get_draw_buffer (),
_cogl_get_read_buffer (),
_cogl_framebuffer_flush_state (cogl_get_draw_framebuffer (),
_cogl_get_read_framebuffer (),
0);
/* Setup the state for the current pipeline */
@ -761,7 +761,7 @@ void
cogl_push_matrix (void)
{
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_modelview_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_push (modelview_stack);
}
@ -769,7 +769,7 @@ void
cogl_pop_matrix (void)
{
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_modelview_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_pop (modelview_stack);
}
@ -777,7 +777,7 @@ void
cogl_scale (float x, float y, float z)
{
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_modelview_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_scale (modelview_stack, x, y, z);
}
@ -785,7 +785,7 @@ void
cogl_translate (float x, float y, float z)
{
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_modelview_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_translate (modelview_stack, x, y, z);
}
@ -793,7 +793,7 @@ void
cogl_rotate (float angle, float x, float y, float z)
{
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_modelview_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_rotate (modelview_stack, angle, x, y, z);
}
@ -801,7 +801,7 @@ void
cogl_transform (const CoglMatrix *matrix)
{
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_modelview_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_multiply (modelview_stack, matrix);
}
@ -830,7 +830,7 @@ cogl_frustum (float left,
float z_far)
{
CoglMatrixStack *projection_stack =
_cogl_framebuffer_get_projection_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_projection_stack (cogl_get_draw_framebuffer ());
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
@ -855,7 +855,7 @@ cogl_ortho (float left,
{
CoglMatrix ortho;
CoglMatrixStack *projection_stack =
_cogl_framebuffer_get_projection_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_projection_stack (cogl_get_draw_framebuffer ());
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
@ -868,7 +868,7 @@ void
cogl_get_modelview_matrix (CoglMatrix *matrix)
{
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_modelview_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_get (modelview_stack, matrix);
_COGL_MATRIX_DEBUG_PRINT (matrix);
}
@ -877,7 +877,7 @@ void
cogl_set_modelview_matrix (CoglMatrix *matrix)
{
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_modelview_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_set (modelview_stack, matrix);
_COGL_MATRIX_DEBUG_PRINT (matrix);
}
@ -886,7 +886,7 @@ void
cogl_get_projection_matrix (CoglMatrix *matrix)
{
CoglMatrixStack *projection_stack =
_cogl_framebuffer_get_projection_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_projection_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_get (projection_stack, matrix);
_COGL_MATRIX_DEBUG_PRINT (matrix);
}
@ -895,7 +895,7 @@ void
cogl_set_projection_matrix (CoglMatrix *matrix)
{
CoglMatrixStack *projection_stack =
_cogl_framebuffer_get_projection_stack (_cogl_get_draw_buffer ());
_cogl_framebuffer_get_projection_stack (cogl_get_draw_framebuffer ());
_cogl_matrix_stack_set (projection_stack, matrix);
/* FIXME: Update the inverse projection matrix!! Presumably use
@ -908,7 +908,7 @@ _cogl_get_clip_state (void)
{
CoglFramebuffer *framebuffer;
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
return _cogl_framebuffer_get_clip_state (framebuffer);
}

View File

@ -1280,8 +1280,11 @@ _cogl_driver_error_quark (void);
void
_cogl_onscreen_clutter_backend_set_size (int width, int height);
#ifdef COGL_ENABLE_EXPERIMENTAL_API
#define cogl_get_draw_framebuffer cogl_get_draw_framebuffer_EXP
CoglFramebuffer *
_cogl_get_draw_buffer (void);
cogl_get_draw_framebuffer (void);
#endif
G_END_DECLS

View File

@ -37,7 +37,7 @@ cogl2_clip_push_from_path (CoglPath *path)
CoglClipState *clip_state;
CoglMatrix modelview_matrix;
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
clip_state = _cogl_framebuffer_get_clip_state (framebuffer);
cogl_get_modelview_matrix (&modelview_matrix);

View File

@ -360,7 +360,7 @@ _cogl_add_path_to_stencil_buffer (CoglPath *path,
gboolean need_clear)
{
CoglPathData *data = path->data;
CoglFramebuffer *framebuffer = _cogl_get_draw_buffer ();
CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
CoglMatrixStack *modelview_stack =
_cogl_framebuffer_get_modelview_stack (framebuffer);
CoglMatrixStack *projection_stack =
@ -484,7 +484,7 @@ cogl2_path_fill (CoglPath *path)
}
else
{
framebuffer = _cogl_get_draw_buffer ();
framebuffer = cogl_get_draw_framebuffer ();
_cogl_framebuffer_flush_journal (framebuffer);
@ -492,7 +492,7 @@ cogl2_path_fill (CoglPath *path)
* as the pipeline state) when flushing the clip stack, so should
* always be done first when preparing to draw. */
_cogl_framebuffer_flush_state (framebuffer,
_cogl_get_read_buffer (),
_cogl_get_read_framebuffer (),
0);
_cogl_path_fill_nodes (path);