mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
path 2.0: update path API for experimental 2.0 API
When COGL_ENABLE_EXPERIMENTAL_2_0_API is defined cogl.h will now include cogl2-path.h which changes cogl_path_new() so it can directly return a CoglPath pointer; it no longer exposes a prototype for cogl_{get,set}_path and all the remaining cogl_path_ functions now take an explicit path as their first argument. The idea is that we want to encourage developers to retain path objects for as long as possible so they can take advantage of us uploading the path geometry to the GPU. Currently although it is possible to start a new path and query the current path, it is not convenient. The other thing is that we want to get Cogl to the point where nothing depends on a global, current context variable. This will allow us to one day define a sensible threading model if/when that is ever desired.
This commit is contained in:
@ -24,10 +24,7 @@
|
||||
#ifndef __COGL_PATH_PRIVATE_H
|
||||
#define __COGL_PATH_PRIVATE_H
|
||||
|
||||
#include "cogl-handle.h"
|
||||
#include "cogl-path.h"
|
||||
|
||||
#define COGL_PATH(tex) ((CoglPath *)(tex))
|
||||
#include "cogl-object.h"
|
||||
|
||||
typedef struct _floatVec2
|
||||
{
|
||||
@ -61,9 +58,9 @@ typedef struct _CoglPathData CoglPathData;
|
||||
|
||||
struct _CoglPath
|
||||
{
|
||||
CoglHandleObject _parent;
|
||||
CoglObject _parent;
|
||||
|
||||
CoglPathData *data;
|
||||
CoglPathData *data;
|
||||
};
|
||||
|
||||
#define COGL_PATH_N_ATTRIBUTES 2
|
||||
@ -88,11 +85,6 @@ struct _CoglPathData
|
||||
CoglVertexAttribute *vbo_attributes[COGL_PATH_N_ATTRIBUTES + 1];
|
||||
};
|
||||
|
||||
/* This is an internal version of cogl_path_new that doesn't affect
|
||||
the current path and just creates a new handle */
|
||||
CoglPath *
|
||||
_cogl_path_new (void);
|
||||
|
||||
void
|
||||
_cogl_add_path_to_stencil_buffer (CoglPath *path,
|
||||
gboolean merge,
|
||||
|
Reference in New Issue
Block a user