summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vega/api_path.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-04-16 18:12:37 +0800
committerChia-I Wu <olv@lunarg.com>2010-05-07 10:41:12 +0800
commit75143ef05576ee9f25ee176bc28c3c4d03705bf5 (patch)
treed8d1bd7f30088a95c8d773a8544a5c29fdcdde0f /src/gallium/state_trackers/vega/api_path.c
parentbdc4504252692b2eb971c08114182828870cc0f8 (diff)
st/vega: Use vgapi.
Rename vgFooBar to vegaFooBar and use vgapi as the dispatcher. This makes sure there is always a current context when the internal functions are called. And eglGetProcAddress is finally supported.
Diffstat (limited to 'src/gallium/state_trackers/vega/api_path.c')
-rw-r--r--src/gallium/state_trackers/vega/api_path.c93
1 files changed, 47 insertions, 46 deletions
diff --git a/src/gallium/state_trackers/vega/api_path.c b/src/gallium/state_trackers/vega/api_path.c
index 58ebb3b60e..6c9a2e8d65 100644
--- a/src/gallium/state_trackers/vega/api_path.c
+++ b/src/gallium/state_trackers/vega/api_path.c
@@ -30,17 +30,18 @@
#include "path.h"
#include "polygon.h"
#include "paint.h"
+#include "api.h"
#include "pipe/p_context.h"
#include "util/u_inlines.h"
#include "util/u_draw_quad.h"
-VGPath vgCreatePath(VGint pathFormat,
- VGPathDatatype datatype,
- VGfloat scale, VGfloat bias,
- VGint segmentCapacityHint,
- VGint coordCapacityHint,
- VGbitfield capabilities)
+VGPath vegaCreatePath(VGint pathFormat,
+ VGPathDatatype datatype,
+ VGfloat scale, VGfloat bias,
+ VGint segmentCapacityHint,
+ VGint coordCapacityHint,
+ VGbitfield capabilities)
{
struct vg_context *ctx = vg_current_context();
@@ -63,7 +64,7 @@ VGPath vgCreatePath(VGint pathFormat,
capabilities);
}
-void vgClearPath(VGPath path, VGbitfield capabilities)
+void vegaClearPath(VGPath path, VGbitfield capabilities)
{
struct vg_context *ctx = vg_current_context();
struct path *p = 0;
@@ -77,7 +78,7 @@ void vgClearPath(VGPath path, VGbitfield capabilities)
path_clear(p, capabilities);
}
-void vgDestroyPath(VGPath p)
+void vegaDestroyPath(VGPath p)
{
struct path *path = 0;
struct vg_context *ctx = vg_current_context();
@@ -91,8 +92,8 @@ void vgDestroyPath(VGPath p)
path_destroy(path);
}
-void vgRemovePathCapabilities(VGPath path,
- VGbitfield capabilities)
+void vegaRemovePathCapabilities(VGPath path,
+ VGbitfield capabilities)
{
struct vg_context *ctx = vg_current_context();
VGbitfield current;
@@ -109,7 +110,7 @@ void vgRemovePathCapabilities(VGPath path,
(~(capabilities & VG_PATH_CAPABILITY_ALL))));
}
-VGbitfield vgGetPathCapabilities(VGPath path)
+VGbitfield vegaGetPathCapabilities(VGPath path)
{
struct vg_context *ctx = vg_current_context();
struct path *p = 0;
@@ -122,7 +123,7 @@ VGbitfield vgGetPathCapabilities(VGPath path)
return path_capabilities(p);
}
-void vgAppendPath(VGPath dstPath, VGPath srcPath)
+void vegaAppendPath(VGPath dstPath, VGPath srcPath)
{
struct vg_context *ctx = vg_current_context();
struct path *src, *dst;
@@ -142,10 +143,10 @@ void vgAppendPath(VGPath dstPath, VGPath srcPath)
path_append_path(dst, src);
}
-void vgAppendPathData(VGPath dstPath,
- VGint numSegments,
- const VGubyte * pathSegments,
- const void * pathData)
+void vegaAppendPathData(VGPath dstPath,
+ VGint numSegments,
+ const VGubyte * pathSegments,
+ const void * pathData)
{
struct vg_context *ctx = vg_current_context();
struct path *p = 0;
@@ -185,10 +186,10 @@ void vgAppendPathData(VGPath dstPath,
path_append_data(p, numSegments, pathSegments, pathData);
}
-void vgModifyPathCoords(VGPath dstPath,
- VGint startIndex,
- VGint numSegments,
- const void * pathData)
+void vegaModifyPathCoords(VGPath dstPath,
+ VGint startIndex,
+ VGint numSegments,
+ const void * pathData)
{
struct vg_context *ctx = vg_current_context();
struct path *p = 0;
@@ -220,7 +221,7 @@ void vgModifyPathCoords(VGPath dstPath,
path_modify_coords(p, startIndex, numSegments, pathData);
}
-void vgTransformPath(VGPath dstPath, VGPath srcPath)
+void vegaTransformPath(VGPath dstPath, VGPath srcPath)
{
struct vg_context *ctx = vg_current_context();
struct path *src = 0, *dst = 0;
@@ -240,10 +241,10 @@ void vgTransformPath(VGPath dstPath, VGPath srcPath)
path_transform(dst, src);
}
-VGboolean vgInterpolatePath(VGPath dstPath,
- VGPath startPath,
- VGPath endPath,
- VGfloat amount)
+VGboolean vegaInterpolatePath(VGPath dstPath,
+ VGPath startPath,
+ VGPath endPath,
+ VGfloat amount)
{
struct vg_context *ctx = vg_current_context();
struct path *start = 0, *dst = 0, *end = 0;
@@ -269,9 +270,9 @@ VGboolean vgInterpolatePath(VGPath dstPath,
start, end, amount);
}
-VGfloat vgPathLength(VGPath path,
- VGint startSegment,
- VGint numSegments)
+VGfloat vegaPathLength(VGPath path,
+ VGint startSegment,
+ VGint numSegments)
{
struct vg_context *ctx = vg_current_context();
struct path *p = 0;
@@ -302,13 +303,13 @@ VGfloat vgPathLength(VGPath path,
return path_length(p, startSegment, numSegments);
}
-void vgPointAlongPath(VGPath path,
- VGint startSegment,
- VGint numSegments,
- VGfloat distance,
- VGfloat * x, VGfloat * y,
- VGfloat * tangentX,
- VGfloat * tangentY)
+void vegaPointAlongPath(VGPath path,
+ VGint startSegment,
+ VGint numSegments,
+ VGfloat distance,
+ VGfloat * x, VGfloat * y,
+ VGfloat * tangentX,
+ VGfloat * tangentY)
{
struct vg_context *ctx = vg_current_context();
struct path *p = 0;
@@ -362,11 +363,11 @@ void vgPointAlongPath(VGPath path,
}
}
-void vgPathBounds(VGPath path,
- VGfloat * minX,
- VGfloat * minY,
- VGfloat * width,
- VGfloat * height)
+void vegaPathBounds(VGPath path,
+ VGfloat * minX,
+ VGfloat * minY,
+ VGfloat * width,
+ VGfloat * height)
{
struct vg_context *ctx = vg_current_context();
struct path *p = 0;
@@ -399,11 +400,11 @@ void vgPathBounds(VGPath path,
path_bounding_rect(p, minX, minY, width, height);
}
-void vgPathTransformedBounds(VGPath path,
- VGfloat * minX,
- VGfloat * minY,
- VGfloat * width,
- VGfloat * height)
+void vegaPathTransformedBounds(VGPath path,
+ VGfloat * minX,
+ VGfloat * minY,
+ VGfloat * width,
+ VGfloat * height)
{
struct vg_context *ctx = vg_current_context();
struct path *p = 0;
@@ -466,7 +467,7 @@ void vgPathTransformedBounds(VGPath path,
}
-void vgDrawPath(VGPath path, VGbitfield paintModes)
+void vegaDrawPath(VGPath path, VGbitfield paintModes)
{
struct vg_context *ctx = vg_current_context();