diff options
Diffstat (limited to 'src/mapi/vgapi')
-rw-r--r-- | src/mapi/vgapi/Makefile | 89 | ||||
-rw-r--r-- | src/mapi/vgapi/vg.pc.in | 12 | ||||
-rw-r--r-- | src/mapi/vgapi/vgapi.csv | 93 | ||||
-rw-r--r-- | src/mapi/vgapi/vgapi_defines.h | 11 |
4 files changed, 205 insertions, 0 deletions
diff --git a/src/mapi/vgapi/Makefile b/src/mapi/vgapi/Makefile new file mode 100644 index 00000000000..702db03d154 --- /dev/null +++ b/src/mapi/vgapi/Makefile @@ -0,0 +1,89 @@ +# src/mapi/vgapi/Makefile + +TOP := ../../.. +include $(TOP)/configs/current + +VG_LIB_MAJOR = 1 +VG_LIB_MINOR = 0 +VG_LIB_PATCH = 0 + +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 $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME) + +$(TOP)/$(LIB_DIR)/$(VG_LIB_NAME): $(VGAPI_OBJECTS) + $(MKLIB) -o $(VG_LIB) -linker '$(CC)' -ldflags '$(LDFLAGS)' \ + -major $(VG_LIB_MAJOR) \ + -minor $(VG_LIB_MINOR) \ + -patch $(VG_LIB_PATCH) \ + -id $(INSTALL_LIB_DIR)/lib$(VG_LIB).$(VG_LIB_MAJOR).dylib \ + $(MKLIB_OPTIONS) -install $(TOP)/$(LIB_DIR) \ + $(VGAPI_OBJECTS) $(VG_LIB_DEPS) + +# not used, but kept for completeness +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 vg.pc + -rm -f $(TOP)/$(LIB_DIR)/$(VG_LIB_NAME) + -rm -f libvgapi.a + -rm -f $(VGAPI_OBJECTS) + -rm -f depend depend.bak + -rm -f $(GENERATED_SOURCES) + +pcedit = \ + -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \ + -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \ + -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \ + -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \ + -e 's,@VG_PC_REQ_PRIV@,$(VG_PC_REQ_PRIV),' \ + -e 's,@VG_PC_LIB_PRIV@,$(VG_PC_LIB_PRIV),' \ + -e 's,@VG_PC_CFLAGS@,$(VG_PC_CFLAGS),' \ + -e 's,@VG_LIB@,$(VG_LIB),' + +vg.pc: vg.pc.in + @sed $(pcedit) $< > $@ + +install-pc: vg.pc + $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + $(INSTALL) -m 644 $< $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + +install-headers: + $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/VG + $(INSTALL) -m 644 $(TOP)/include/VG/*.h $(DESTDIR)$(INSTALL_INC_DIR)/VG + +install: default install-headers install-pc + $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) + $(MINSTALL) $(TOP)/$(LIB_DIR)/$(VG_LIB_GLOB) \ + $(DESTDIR)$(INSTALL_LIB_DIR) + +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 diff --git a/src/mapi/vgapi/vg.pc.in b/src/mapi/vgapi/vg.pc.in new file mode 100644 index 00000000000..63e9af8355b --- /dev/null +++ b/src/mapi/vgapi/vg.pc.in @@ -0,0 +1,12 @@ +prefix=@INSTALL_DIR@ +exec_prefix=${prefix} +libdir=@INSTALL_LIB_DIR@ +includedir=@INSTALL_INC_DIR@ + +Name: vg +Description: Mesa OpenVG 1.0 library +Requires.private: @VG_PC_REQ_PRIV@ +Version: @VERSION@ +Libs: -L${libdir} -l@VG_LIB@ +Libs.private: @VG_PC_LIB_PRIV@ +Cflags: -I${includedir} @VG_PC_CFLAGS@ diff --git a/src/mapi/vgapi/vgapi.csv b/src/mapi/vgapi/vgapi.csv new file mode 100644 index 00000000000..d28ee32b28b --- /dev/null +++ b/src/mapi/vgapi/vgapi.csv @@ -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] diff --git a/src/mapi/vgapi/vgapi_defines.h b/src/mapi/vgapi/vgapi_defines.h new file mode 100644 index 00000000000..fb9f68c7adf --- /dev/null +++ b/src/mapi/vgapi/vgapi_defines.h @@ -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 */ |