summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vega/api_images.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_images.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_images.c')
-rw-r--r--src/gallium/state_trackers/vega/api_images.c91
1 files changed, 46 insertions, 45 deletions
diff --git a/src/gallium/state_trackers/vega/api_images.c b/src/gallium/state_trackers/vega/api_images.c
index 6c7fd3b346..547508f815 100644
--- a/src/gallium/state_trackers/vega/api_images.c
+++ b/src/gallium/state_trackers/vega/api_images.c
@@ -32,6 +32,7 @@
#include "vg_translate.h"
#include "api_consts.h"
#include "image.h"
+#include "api.h"
#include "pipe/p_context.h"
#include "pipe/p_screen.h"
@@ -92,9 +93,9 @@ static INLINE VGboolean supported_image_format(VGImageFormat format)
return VG_FALSE;
}
-VGImage vgCreateImage(VGImageFormat format,
- VGint width, VGint height,
- VGbitfield allowedQuality)
+VGImage vegaCreateImage(VGImageFormat format,
+ VGint width, VGint height,
+ VGbitfield allowedQuality)
{
struct vg_context *ctx = vg_current_context();
@@ -126,7 +127,7 @@ VGImage vgCreateImage(VGImageFormat format,
return (VGImage)image_create(format, width, height);
}
-void vgDestroyImage(VGImage image)
+void vegaDestroyImage(VGImage image)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *img = (struct vg_image *)image;
@@ -142,9 +143,9 @@ void vgDestroyImage(VGImage image)
image_destroy(img);
}
-void vgClearImage(VGImage image,
- VGint x, VGint y,
- VGint width, VGint height)
+void vegaClearImage(VGImage image,
+ VGint x, VGint y,
+ VGint width, VGint height)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *img;
@@ -167,12 +168,12 @@ void vgClearImage(VGImage image,
}
-void vgImageSubData(VGImage image,
- const void * data,
- VGint dataStride,
- VGImageFormat dataFormat,
- VGint x, VGint y,
- VGint width, VGint height)
+void vegaImageSubData(VGImage image,
+ const void * data,
+ VGint dataStride,
+ VGImageFormat dataFormat,
+ VGint x, VGint y,
+ VGint width, VGint height)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *img;
@@ -195,12 +196,12 @@ void vgImageSubData(VGImage image,
x, y, width, height);
}
-void vgGetImageSubData(VGImage image,
- void * data,
- VGint dataStride,
- VGImageFormat dataFormat,
- VGint x, VGint y,
- VGint width, VGint height)
+void vegaGetImageSubData(VGImage image,
+ void * data,
+ VGint dataStride,
+ VGImageFormat dataFormat,
+ VGint x, VGint y,
+ VGint width, VGint height)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *img;
@@ -222,9 +223,9 @@ void vgGetImageSubData(VGImage image,
x, y, width, height);
}
-VGImage vgChildImage(VGImage parent,
- VGint x, VGint y,
- VGint width, VGint height)
+VGImage vegaChildImage(VGImage parent,
+ VGint x, VGint y,
+ VGint width, VGint height)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *p;
@@ -252,7 +253,7 @@ VGImage vgChildImage(VGImage parent,
return (VGImage)image_child_image(p, x, y, width, height);
}
-VGImage vgGetParent(VGImage image)
+VGImage vegaGetParent(VGImage image)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *img;
@@ -269,10 +270,10 @@ VGImage vgGetParent(VGImage image)
return image;
}
-void vgCopyImage(VGImage dst, VGint dx, VGint dy,
- VGImage src, VGint sx, VGint sy,
- VGint width, VGint height,
- VGboolean dither)
+void vegaCopyImage(VGImage dst, VGint dx, VGint dy,
+ VGImage src, VGint sx, VGint sy,
+ VGint width, VGint height,
+ VGboolean dither)
{
struct vg_context *ctx = vg_current_context();
@@ -291,7 +292,7 @@ void vgCopyImage(VGImage dst, VGint dx, VGint dy,
width, height, dither);
}
-void vgDrawImage(VGImage image)
+void vegaDrawImage(VGImage image)
{
struct vg_context *ctx = vg_current_context();
@@ -307,9 +308,9 @@ void vgDrawImage(VGImage image)
image_draw((struct vg_image*)image);
}
-void vgSetPixels(VGint dx, VGint dy,
- VGImage src, VGint sx, VGint sy,
- VGint width, VGint height)
+void vegaSetPixels(VGint dx, VGint dy,
+ VGImage src, VGint sx, VGint sy,
+ VGint width, VGint height)
{
struct vg_context *ctx = vg_current_context();
@@ -327,9 +328,9 @@ void vgSetPixels(VGint dx, VGint dy,
height);
}
-void vgGetPixels(VGImage dst, VGint dx, VGint dy,
- VGint sx, VGint sy,
- VGint width, VGint height)
+void vegaGetPixels(VGImage dst, VGint dx, VGint dy,
+ VGint sx, VGint sy,
+ VGint width, VGint height)
{
struct vg_context *ctx = vg_current_context();
struct vg_image *img;
@@ -349,10 +350,10 @@ void vgGetPixels(VGImage dst, VGint dx, VGint dy,
sx, sy, width, height);
}
-void vgWritePixels(const void * data, VGint dataStride,
- VGImageFormat dataFormat,
- VGint dx, VGint dy,
- VGint width, VGint height)
+void vegaWritePixels(const void * data, VGint dataStride,
+ VGImageFormat dataFormat,
+ VGint dx, VGint dy,
+ VGint width, VGint height)
{
struct vg_context *ctx = vg_current_context();
struct pipe_context *pipe = ctx->pipe;
@@ -390,10 +391,10 @@ void vgWritePixels(const void * data, VGint dataStride,
pipe->flush(pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
}
-void vgReadPixels(void * data, VGint dataStride,
- VGImageFormat dataFormat,
- VGint sx, VGint sy,
- VGint width, VGint height)
+void vegaReadPixels(void * data, VGint dataStride,
+ VGImageFormat dataFormat,
+ VGint sx, VGint sy,
+ VGint width, VGint height)
{
struct vg_context *ctx = vg_current_context();
struct pipe_context *pipe = ctx->pipe;
@@ -461,9 +462,9 @@ void vgReadPixels(void * data, VGint dataStride,
}
}
-void vgCopyPixels(VGint dx, VGint dy,
- VGint sx, VGint sy,
- VGint width, VGint height)
+void vegaCopyPixels(VGint dx, VGint dy,
+ VGint sx, VGint sy,
+ VGint width, VGint height)
{
struct vg_context *ctx = vg_current_context();
struct pipe_framebuffer_state *fb = &ctx->state.g3d.fb;