path: use cogl_framebuffer_push_path_clip in cogl2-path.c
_cogl_path_fill_nodes_with_clipped_rectangle() sometimes falls back to pushing a framebuffer clip region and filling the region using cogl_rectangle(). Since we aim to eventually deprecate cogl_clip_push_from_path() as it relies on the default CoglContext we would rather this internal code update a framebuffer's clip-state using the cogl_framebuffer clip stack api instead. Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
36575502e8
commit
5156365eae
@ -272,6 +272,8 @@ _cogl_path_get_bounds (CoglPath *path,
|
|||||||
static void
|
static void
|
||||||
_cogl_path_fill_nodes_with_clipped_rectangle (CoglPath *path)
|
_cogl_path_fill_nodes_with_clipped_rectangle (CoglPath *path)
|
||||||
{
|
{
|
||||||
|
CoglFramebuffer *fb;
|
||||||
|
|
||||||
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
_COGL_GET_CONTEXT (ctx, NO_RETVAL);
|
||||||
|
|
||||||
if (!(ctx->private_feature_flags & COGL_PRIVATE_FEATURE_STENCIL_BUFFER))
|
if (!(ctx->private_feature_flags & COGL_PRIVATE_FEATURE_STENCIL_BUFFER))
|
||||||
@ -287,12 +289,13 @@ _cogl_path_fill_nodes_with_clipped_rectangle (CoglPath *path)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cogl_clip_push_from_path (path);
|
fb = cogl_get_draw_framebuffer ();
|
||||||
|
cogl_framebuffer_push_path_clip (fb, path);
|
||||||
cogl_rectangle (path->data->path_nodes_min.x,
|
cogl_rectangle (path->data->path_nodes_min.x,
|
||||||
path->data->path_nodes_min.y,
|
path->data->path_nodes_min.y,
|
||||||
path->data->path_nodes_max.x,
|
path->data->path_nodes_max.x,
|
||||||
path->data->path_nodes_max.y);
|
path->data->path_nodes_max.y);
|
||||||
cogl_clip_pop ();
|
cogl_framebuffer_pop_clip (fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user