mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
Replace cogl_path_{stroke,fill} with framebuffer API
The existing functions for stroking and filling a path depend on the global framebuffer and source stacks. These are now replaced with cogl_framebuffer_{stroke,fill}_path which get explicitly passed the framebuffer and pipeline. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 713a8f8160bc5884b091c69eb7a84b069e0950e6)
This commit is contained in:

committed by
Robert Bragg

parent
54735dec84
commit
8dd77de009
@ -47,6 +47,7 @@
|
||||
#include "cogl1-context.h"
|
||||
#include "cogl-private.h"
|
||||
#include "cogl-primitives-private.h"
|
||||
#include "cogl-path-private.h"
|
||||
|
||||
#ifndef GL_FRAMEBUFFER
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
@ -3522,3 +3523,27 @@ cogl_framebuffer_draw_textured_rectangles (CoglFramebuffer *framebuffer,
|
||||
n_rectangles,
|
||||
TRUE);
|
||||
}
|
||||
|
||||
void
|
||||
cogl_framebuffer_fill_path (CoglFramebuffer *framebuffer,
|
||||
CoglPipeline *pipeline,
|
||||
CoglPath *path)
|
||||
{
|
||||
_COGL_RETURN_IF_FAIL (cogl_is_framebuffer (framebuffer));
|
||||
_COGL_RETURN_IF_FAIL (cogl_is_pipeline (pipeline));
|
||||
_COGL_RETURN_IF_FAIL (cogl_is_path (path));
|
||||
|
||||
_cogl_path_fill_nodes (path, framebuffer, pipeline, 0 /* flags */);
|
||||
}
|
||||
|
||||
void
|
||||
cogl_framebuffer_stroke_path (CoglFramebuffer *framebuffer,
|
||||
CoglPipeline *pipeline,
|
||||
CoglPath *path)
|
||||
{
|
||||
_COGL_RETURN_IF_FAIL (cogl_is_framebuffer (framebuffer));
|
||||
_COGL_RETURN_IF_FAIL (cogl_is_pipeline (pipeline));
|
||||
_COGL_RETURN_IF_FAIL (cogl_is_path (path));
|
||||
|
||||
_cogl_path_stroke_nodes (path, framebuffer, pipeline);
|
||||
}
|
||||
|
Reference in New Issue
Block a user