mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
mapi: Add vgapi.
vgapi is a dispatcher for OpenVG.
This commit is contained in:
parent
d4589d3816
commit
bdc4504252
3 changed files with 154 additions and 0 deletions
50
src/mapi/vgapi/Makefile
Normal file
50
src/mapi/vgapi/Makefile
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
# src/mapi/vgapi/Makefile
|
||||
|
||||
TOP := ../../..
|
||||
include $(TOP)/configs/current
|
||||
|
||||
MAPI := $(TOP)/src/mapi/mapi
|
||||
|
||||
include $(MAPI)/sources.mak
|
||||
VGAPI_SOURCES := $(addprefix $(MAPI)/, $(MAPI_SOURCES))
|
||||
VGAPI_OBJECTS := $(MAPI_SOURCES:.c=.o)
|
||||
|
||||
VGAPI_CPPFLAGS := -DMAPI_ABI_HEADER=\"vgapi/vgapi_tmp.h\"
|
||||
|
||||
GENERATED_SOURCES := vgapi_tmp.h
|
||||
|
||||
INCLUDE_DIRS := \
|
||||
-I$(TOP)/include \
|
||||
-I$(TOP)/src/mapi
|
||||
|
||||
.PHONY: default
|
||||
default: depend libvgapi.a
|
||||
|
||||
libvgapi.a: $(VGAPI_OBJECTS)
|
||||
@$(MKLIB) -o vgapi -static $(VGAPI_OBJECTS)
|
||||
|
||||
$(VGAPI_SOURCES): | $(GENERATED_SOURCES)
|
||||
|
||||
$(VGAPI_OBJECTS): %.o: $(MAPI)/%.c
|
||||
$(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(VGAPI_CPPFLAGS) $< -o $@
|
||||
|
||||
vgapi_tmp.h: vgapi.csv $(MAPI)/mapi_abi.py
|
||||
$(PYTHON2) $(PYTHON_FLAGS) $(MAPI)/mapi_abi.py \
|
||||
-i vgapi/vgapi_defines.h $< > $@
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
-rm -f libvgapi.a
|
||||
-rm -f $(VGAPI_OBJECTS)
|
||||
-rm -f depend depend.bak
|
||||
-rm -f $(GENERATED_SOURCES)
|
||||
|
||||
# nothing to install
|
||||
install:
|
||||
|
||||
depend: $(VGAPI_SOURCES)
|
||||
@echo "running $(MKDEP)"
|
||||
@touch depend
|
||||
@$(MKDEP) $(MKDEP_OPTIONS) -f- $(DEFINES) $(INCLUDE_DIRS) \
|
||||
$(VGAPI_CPPFLAGS) $(VGAPI_SOURCES) 2>/dev/null | \
|
||||
sed -e 's,^$(MAPI)/,,' > depend
|
||||
93
src/mapi/vgapi/vgapi.csv
Normal file
93
src/mapi/vgapi/vgapi.csv
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
# This is the source file for the various generate structs/tables/functions
|
||||
# used in st/vega.
|
||||
|
||||
# OpenVG 1.0
|
||||
void, AppendPath, VGPath dstPath, VGPath srcPath
|
||||
void, AppendPathData, VGPath dstPath, VGint numSegments, const VGubyte *pathSegments, const void *pathData
|
||||
VGImage, ChildImage, VGImage parent, VGint x, VGint y, VGint width, VGint height
|
||||
void, Clear, VGint x, VGint y, VGint width, VGint height
|
||||
void, ClearImage, VGImage image, VGint x, VGint y, VGint width, VGint height
|
||||
void, ClearPath, VGPath path, VGbitfield capabilities
|
||||
void, ColorMatrix, VGImage dst, VGImage src, const VGfloat *matrix
|
||||
void, Convolve, VGImage dst, VGImage src, VGint kernelWidth, VGint kernelHeight, VGint shiftX, VGint shiftY, const VGshort *kernel, VGfloat scale, VGfloat bias, VGTilingMode tilingMode
|
||||
void, CopyImage, VGImage dst, VGint dx, VGint dy, VGImage src, VGint sx, VGint sy, VGint width, VGint height, VGboolean dither
|
||||
void, CopyPixels, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
|
||||
VGImage, CreateImage, VGImageFormat format, VGint width, VGint height, VGbitfield allowedQuality
|
||||
VGPaint, CreatePaint, void
|
||||
VGPath, CreatePath, VGint pathFormat, VGPathDatatype datatype, VGfloat scale, VGfloat bias, VGint segmentCapacityHint, VGint coordCapacityHint, VGbitfield capabilities
|
||||
void, DestroyImage, VGImage image
|
||||
void, DestroyPaint, VGPaint paint
|
||||
void, DestroyPath, VGPath path
|
||||
void, DrawImage, VGImage image
|
||||
void, DrawPath, VGPath path, VGbitfield paintModes
|
||||
void, Finish, void
|
||||
void, Flush, void
|
||||
void, GaussianBlur, VGImage dst, VGImage src, VGfloat stdDeviationX, VGfloat stdDeviationY, VGTilingMode tilingMode
|
||||
VGuint, GetColor, VGPaint paint
|
||||
VGErrorCode, GetError, void
|
||||
void, GetImageSubData, VGImage image, void *data, VGint dataStride, VGImageFormat dataFormat, VGint x, VGint y, VGint width, VGint height
|
||||
void, GetMatrix, VGfloat *m
|
||||
VGPaint, GetPaint, VGPaintMode paintMode
|
||||
VGint, GetParameterVectorSize, VGHandle object, VGint paramType
|
||||
VGfloat, GetParameterf, VGHandle object, VGint paramType
|
||||
void, GetParameterfv, VGHandle object, VGint paramType, VGint count, VGfloat *values
|
||||
VGint, GetParameteri, VGHandle object, VGint paramType
|
||||
void, GetParameteriv, VGHandle object, VGint paramType, VGint count, VGint *values
|
||||
VGImage, GetParent, VGImage image
|
||||
VGbitfield, GetPathCapabilities, VGPath path
|
||||
void, GetPixels, VGImage dst, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
|
||||
const VGubyte *, GetString, VGStringID name
|
||||
VGint, GetVectorSize, VGParamType type
|
||||
VGfloat, Getf, VGParamType type
|
||||
void, Getfv, VGParamType type, VGint count, VGfloat *values
|
||||
VGint, Geti, VGParamType type
|
||||
void, Getiv, VGParamType type, VGint count, VGint *values
|
||||
VGHardwareQueryResult, HardwareQuery, VGHardwareQueryType key, VGint setting
|
||||
void, ImageSubData, VGImage image, const void *data, VGint dataStride, VGImageFormat dataFormat, VGint x, VGint y, VGint width, VGint height
|
||||
VGboolean, InterpolatePath, VGPath dstPath, VGPath startPath, VGPath endPath, VGfloat amount
|
||||
void, LoadIdentity, void
|
||||
void, LoadMatrix, const VGfloat *m
|
||||
void, Lookup, VGImage dst, VGImage src, const VGubyte *redLUT, const VGubyte *greenLUT, const VGubyte *blueLUT, const VGubyte *alphaLUT, VGboolean outputLinear, VGboolean outputPremultiplied
|
||||
void, LookupSingle, VGImage dst, VGImage src, const VGuint *lookupTable, VGImageChannel sourceChannel, VGboolean outputLinear, VGboolean outputPremultiplied
|
||||
void, Mask, VGHandle mask, VGMaskOperation operation, VGint x, VGint y, VGint width, VGint height
|
||||
void, ModifyPathCoords, VGPath dstPath, VGint startIndex, VGint numSegments, const void *pathData
|
||||
void, MultMatrix, const VGfloat *m
|
||||
void, PaintPattern, VGPaint paint, VGImage pattern
|
||||
void, PathBounds, VGPath path, VGfloat *minX, VGfloat *minY, VGfloat *width, VGfloat *height
|
||||
VGfloat, PathLength, VGPath path, VGint startSegment, VGint numSegments
|
||||
void, PathTransformedBounds, VGPath path, VGfloat *minX, VGfloat *minY, VGfloat *width, VGfloat *height
|
||||
void, PointAlongPath, VGPath path, VGint startSegment, VGint numSegments, VGfloat distance, VGfloat *x, VGfloat *y, VGfloat *tangentX, VGfloat *tangentY
|
||||
void, ReadPixels, void *data, VGint dataStride, VGImageFormat dataFormat, VGint sx, VGint sy, VGint width, VGint height
|
||||
void, RemovePathCapabilities, VGPath path, VGbitfield capabilities
|
||||
void, Rotate, VGfloat angle
|
||||
void, Scale, VGfloat sx, VGfloat sy
|
||||
void, SeparableConvolve, VGImage dst, VGImage src, VGint kernelWidth, VGint kernelHeight, VGint shiftX, VGint shiftY, const VGshort *kernelX, const VGshort *kernelY, VGfloat scale, VGfloat bias, VGTilingMode tilingMode
|
||||
void, SetColor, VGPaint paint, VGuint rgba
|
||||
void, SetPaint, VGPaint paint, VGbitfield paintModes
|
||||
void, SetParameterf, VGHandle object, VGint paramType, VGfloat value
|
||||
void, SetParameterfv, VGHandle object, VGint paramType, VGint count, const VGfloat *values
|
||||
void, SetParameteri, VGHandle object, VGint paramType, VGint value
|
||||
void, SetParameteriv, VGHandle object, VGint paramType, VGint count, const VGint *values
|
||||
void, SetPixels, VGint dx, VGint dy, VGImage src, VGint sx, VGint sy, VGint width, VGint height
|
||||
void, Setf, VGParamType type, VGfloat value
|
||||
void, Setfv, VGParamType type, VGint count, const VGfloat *values
|
||||
void, Seti, VGParamType type, VGint value
|
||||
void, Setiv, VGParamType type, VGint count, const VGint *values
|
||||
void, Shear, VGfloat shx, VGfloat shy
|
||||
void, TransformPath, VGPath dstPath, VGPath srcPath
|
||||
void, Translate, VGfloat tx, VGfloat ty
|
||||
void, WritePixels, const void *data, VGint dataStride, VGImageFormat dataFormat, VGint dx, VGint dy, VGint width, VGint height
|
||||
|
||||
## OpenVG 1.1
|
||||
#void, ClearGlyph, VGFont font,VGuint glyphIndex
|
||||
#void, CopyMask, VGMaskLayer maskLayer, VGint dx, VGint dy, VGint sx, VGint sy, VGint width, VGint height
|
||||
#VGFont, CreateFont, VGint glyphCapacityHint
|
||||
#VGMaskLayer, CreateMaskLayer, VGint width, VGint height
|
||||
#void, DestroyFont, VGFont font
|
||||
#void, DestroyMaskLayer, VGMaskLayer maskLayer
|
||||
#void, DrawGlyph, VGFont font, VGuint glyphIndex, VGbitfield paintModes, VGboolean allowAutoHinting
|
||||
#void, DrawGlyphs, VGFont font, VGint glyphCount, const VGuint *glyphIndices, const VGfloat *adjustments_x, const VGfloat *adjustments_y, VGbitfield paintModes, VGboolean allowAutoHinting
|
||||
#void, FillMaskLayer, VGMaskLayer maskLayer, VGint x, VGint y, VGint width, VGint height, VGfloat value
|
||||
#void, RenderToMask, VGPath path, VGbitfield paintModes, VGMaskOperation operation
|
||||
#void, SetGlyphToImage, VGFont font, VGuint glyphIndex, VGImage image, const VGfloat glyphOrigin[2], const VGfloat escapement[2]
|
||||
#void, SetGlyphToPath, VGFont font, VGuint glyphIndex, VGPath path, VGboolean isHinted, const VGfloat glyphOrigin[2], const VGfloat escapement[2]
|
||||
|
11
src/mapi/vgapi/vgapi_defines.h
Normal file
11
src/mapi/vgapi/vgapi_defines.h
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#ifndef VGAPI_DEFINES_H
|
||||
#define VGAPI_DEFINES_H
|
||||
|
||||
#include "VG/openvg.h"
|
||||
#include "VG/vgext.h"
|
||||
|
||||
#define MAPI_ABI_PREFIX vg
|
||||
#define MAPI_ABI_PUBLIC VG_API_CALL
|
||||
#define MAPI_ABI_ATTR VG_API_ENTRY
|
||||
|
||||
#endif /* VGAPI_DEFINES_H */
|
||||
Loading…
Add table
Reference in a new issue