mirror of
https://github.com/brl/mutter.git
synced 2025-08-01 14:15:30 +00:00
Separate out CoglPath api into sub-library
This splits out the cogl_path_ api into a separate cogl-path sub-library like cogl-pango and cogl-gst. This enables developers to build Cogl with this sub-library disabled if they don't need it which can be useful when its important to keep the size of an application and its dependencies down to a minimum. The functions cogl_framebuffer_{fill,stroke}_path have been renamed to cogl_path_{fill,stroke}. There were a few places in core cogl and cogl-gst that referenced the CoglPath api and these have been decoupled by using the CoglPrimitive api instead. In the case of cogl_framebuffer_push_path_clip() the core clip stack no longer accepts path clips directly but it's now possible to get a CoglPrimitive for the fill of a path and so the implementation of cogl_framebuffer_push_path_clip() now lives in cogl-path and works as a shim that first gets a CoglPrimitive and uses cogl_framebuffer_push_primitive_clip instead. We may want to consider renaming cogl_framebuffer_push_path_clip to put it in the cogl_path_ namespace. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 8aadfd829239534fb4ec8255cdea813d698c5a3f) So as to avoid breaking the 1.x API or even the ABI since we are quite late in the 1.16 development cycle the patch was modified to build cogl-path as a noinst_LTLIBRARY before building cogl and link the code directly into libcogl.so as it was previously. This way we can wait until the start of the 1.18 cycle before splitting the code into a separate libcogl-path.so. This also adds shims for cogl_framebuffer_fill/stroke_path() to avoid breaking the 1.x API/ABI.
This commit is contained in:
@@ -37,12 +37,6 @@
|
||||
*/
|
||||
typedef struct _CoglFramebuffer CoglFramebuffer;
|
||||
|
||||
#ifdef COGL_ENABLE_EXPERIMENTAL_2_0_API
|
||||
#include <cogl/cogl2-path.h>
|
||||
#else
|
||||
#include <cogl/cogl-path.h>
|
||||
#endif
|
||||
|
||||
#include <cogl/cogl-pipeline.h>
|
||||
#include <cogl/cogl-indices.h>
|
||||
#include <cogl/cogl-bitmap.h>
|
||||
@@ -598,23 +592,6 @@ cogl_framebuffer_push_rectangle_clip (CoglFramebuffer *framebuffer,
|
||||
float x_2,
|
||||
float y_2);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_push_path_clip:
|
||||
* @framebuffer: A #CoglFramebuffer pointer
|
||||
* @path: The path to clip with.
|
||||
*
|
||||
* Sets a new clipping area using the silhouette of the specified,
|
||||
* filled @path. The clipping area is intersected with the previous
|
||||
* clipping area. To restore the previous clipping area, call
|
||||
* cogl_framebuffer_pop_clip().
|
||||
*
|
||||
* Since: 1.0
|
||||
* Stability: unstable
|
||||
*/
|
||||
void
|
||||
cogl_framebuffer_push_path_clip (CoglFramebuffer *framebuffer,
|
||||
CoglPath *path);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_push_primitive_clip:
|
||||
* @framebuffer: A #CoglFramebuffer pointer
|
||||
@@ -1387,47 +1364,6 @@ cogl_framebuffer_draw_textured_rectangles (CoglFramebuffer *framebuffer,
|
||||
const float *coordinates,
|
||||
unsigned int n_rectangles);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_fill_path:
|
||||
* @framebuffer: A #CoglFramebuffer
|
||||
* @pipeline: A #CoglPipeline to render with
|
||||
* @path: The #CoglPath to fill
|
||||
*
|
||||
* Fills the interior of the path using the fragment operations
|
||||
* defined by the pipeline.
|
||||
*
|
||||
* The interior of the shape is determined using the fill rule of the
|
||||
* path. See %CoglPathFillRule for details.
|
||||
*
|
||||
* <note>The result of referencing sliced textures in your current
|
||||
* pipeline when filling a path are undefined. You should pass
|
||||
* the %COGL_TEXTURE_NO_SLICING flag when loading any texture you will
|
||||
* use while filling a path.</note>
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
void
|
||||
cogl_framebuffer_fill_path (CoglFramebuffer *framebuffer,
|
||||
CoglPipeline *pipeline,
|
||||
CoglPath *path);
|
||||
|
||||
/**
|
||||
* cogl_framebuffer_stroke_path:
|
||||
* @framebuffer: A #CoglFramebuffer
|
||||
* @pipeline: A #CoglPipeline to render with
|
||||
* @path: The #CoglPath to stroke
|
||||
*
|
||||
* Strokes the edge of the path using the fragment operations defined
|
||||
* by the pipeline. The stroke line will have a width of 1 pixel
|
||||
* regardless of the current transformation matrix.
|
||||
*
|
||||
* Since: 2.0
|
||||
*/
|
||||
void
|
||||
cogl_framebuffer_stroke_path (CoglFramebuffer *framebuffer,
|
||||
CoglPipeline *pipeline,
|
||||
CoglPath *path);
|
||||
|
||||
/* XXX: Should we take an n_buffers + buffer id array instead of using
|
||||
* the CoglBufferBits type which doesn't seem future proof? */
|
||||
/**
|
||||
|
Reference in New Issue
Block a user