mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-24 20:40:10 +01:00
This adds a new GPU accelerated backend for Cairo based on the Cogl 3D graphics API. This backend aims to support Cairo in a way that translates as naturally as possible to using a GPU, it does not strive to compete with the anti-aliasing quality of the image backend if it can't be done efficiently using the GPU - raw performance isn't the only metric of concern, so is power usage. As an overview of how the backend works: - fills are handled by tessellating paths into triangles - the backend has an extra fill_rectangle drawing operation so we have a fast-path for drawing rectangles which are so common. - strokes are also tessellated into triangles. - stroke and fill tessellations are cached to avoid the cpu overhead of tessellation and cost of upload given that its common for apps to re-draw the same path multiple times. The tessellations can survive translations and rotations increasing the probability that they can be re-used. - sources and masks are handled using multi-texturing. - clipping is handled with a scissor and the stencil buffer which we're careful to only update when they really change. - linear gradients are rendered to a 1d texture using a triangle strip + interpolating color attributes. All cairo extend modes are handled by corresponding texture sampler wrap modes without needing programmable fragment processing. - antialiasing should be handled using Cogl's multisampling API XXX: This is a work in progress!! TODO: - handle at least basic radial gradients (No need to handle full pdf semantics, since css, svg and canvas only allow radial gradients defined as one circle + a point that must lie within the first circle.) - currently we fall back to pixman for radial gradients. - support glyph rendering with a decent glyph cache design. The current plan is a per scaled-font growable cache texture + a scratch cache for one-shot/short-lived glyphs. - decide how to handle npot textures when lacking hardware support. Current plan is to add a transparent border to npot textures and use CLAMP_TO_EDGE for the default EXTEND_NONE semantics. For anything else we can allocate a shadow npot texture and scale the original to fit that so we can map extend modes to texture sampler modes.
130 lines
5.5 KiB
Text
130 lines
5.5 KiB
Text
# Generated by configure. Do not edit.
|
|
|
|
$(top_srcdir)/src/cairo-features.h: $(top_srcdir)/build/Makefile.win32.features
|
|
@echo "Generating src/cairo-features.h"
|
|
@echo "/* Generated by Makefile.win32.features-h. Do not edit. */" > $(top_srcdir)/src/cairo-features.h
|
|
@echo "#ifndef CAIRO_FEATURES_H" >> $(top_srcdir)/src/cairo-features.h
|
|
@echo "#define CAIRO_FEATURES_H 1" >> $(top_srcdir)/src/cairo-features.h
|
|
ifeq ($(CAIRO_HAS_XLIB_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_XLIB_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_XLIB_XRENDER_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_XLIB_XRENDER_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_XCB_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_XCB_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_XLIB_XCB_FUNCTIONS),1)
|
|
@echo "#define CAIRO_HAS_XLIB_XCB_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_XCB_SHM_FUNCTIONS),1)
|
|
@echo "#define CAIRO_HAS_XCB_SHM_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_QT_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_QT_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_QUARTZ_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_QUARTZ_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_QUARTZ_FONT),1)
|
|
@echo "#define CAIRO_HAS_QUARTZ_FONT 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_QUARTZ_IMAGE_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_QUARTZ_IMAGE_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_WIN32_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_WIN32_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_WIN32_FONT),1)
|
|
@echo "#define CAIRO_HAS_WIN32_FONT 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_SKIA_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_SKIA_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_OS2_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_OS2_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_BEOS_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_BEOS_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_DRM_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_DRM_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_GALLIUM_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_GALLIUM_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_PNG_FUNCTIONS),1)
|
|
@echo "#define CAIRO_HAS_PNG_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_GL_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_GL_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_GLESV2_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_GLESV2_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_COGL_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_COGL_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_DIRECTFB_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_DIRECTFB_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_VG_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_VG_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_EGL_FUNCTIONS),1)
|
|
@echo "#define CAIRO_HAS_EGL_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_GLX_FUNCTIONS),1)
|
|
@echo "#define CAIRO_HAS_GLX_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_WGL_FUNCTIONS),1)
|
|
@echo "#define CAIRO_HAS_WGL_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_SCRIPT_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_SCRIPT_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_FT_FONT),1)
|
|
@echo "#define CAIRO_HAS_FT_FONT 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_FC_FONT),1)
|
|
@echo "#define CAIRO_HAS_FC_FONT 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_PS_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_PS_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_PDF_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_PDF_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_SVG_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_SVG_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_TEST_SURFACES),1)
|
|
@echo "#define CAIRO_HAS_TEST_SURFACES 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
@echo "#define CAIRO_HAS_IMAGE_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
@echo "#define CAIRO_HAS_MIME_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
@echo "#define CAIRO_HAS_RECORDING_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
@echo "#define CAIRO_HAS_OBSERVER_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
ifeq ($(CAIRO_HAS_TEE_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_TEE_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_XML_SURFACE),1)
|
|
@echo "#define CAIRO_HAS_XML_SURFACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
@echo "#define CAIRO_HAS_USER_FONT 1" >> $(top_srcdir)/src/cairo-features.h
|
|
ifeq ($(CAIRO_HAS_PTHREAD),1)
|
|
@echo "#define CAIRO_HAS_PTHREAD 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_GOBJECT_FUNCTIONS),1)
|
|
@echo "#define CAIRO_HAS_GOBJECT_FUNCTIONS 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_TRACE),1)
|
|
@echo "#define CAIRO_HAS_TRACE 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_INTERPRETER),1)
|
|
@echo "#define CAIRO_HAS_INTERPRETER 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
ifeq ($(CAIRO_HAS_SYMBOL_LOOKUP),1)
|
|
@echo "#define CAIRO_HAS_SYMBOL_LOOKUP 1" >> $(top_srcdir)/src/cairo-features.h
|
|
endif
|
|
@echo "#endif" >> $(top_srcdir)/src/cairo-features.h
|