aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/x11_cairo.c
AgeCommit message (Collapse)AuthorFilesLines
2020-10-21Move includes to a separate directoryDavid Robillard1-170/+0
This is more conventional and directories named "include" are specially understood by some tooling like clang-tidy.
2020-05-16Use email address in copyright headersDavid Robillard1-1/+1
Not really sure why I used a web link here (maybe because it's more stable), but this is more conventional.
2020-05-16Fix file documentationDavid Robillard1-2/+3
2020-03-16Cleanup: Remove unused includeDavid Robillard1-1/+0
2020-03-15X11: Don't use CAIRO_OPERATOR_SOURCE for blittingDavid Robillard1-1/+0
This causes artifacts in some scenarios. Although CAIRO_OPERATOR_SOURCE should be faster, the default operator works better in the absence of real double buffering.
2020-03-15Remove backend resize methodDavid Robillard1-1/+0
2020-03-14Add logging APIDavid Robillard1-1/+0
2020-03-01Cleanup: Use a consistent style for all backend definitionsDavid Robillard1-9/+7
2020-03-01Cleanup: Fix includesDavid Robillard1-1/+0
2020-02-18X11: Use ephemeral Cairo surfaces for drawingDavid Robillard1-51/+66
This uses a similar approach to Gtk, where surfaces are created every draw call. It is a bit slower for a single application in most cases, but uses less memory when drawing isn't happening and plays more nicely with other views or applications.
2020-02-18Pass expose event to backend enter and leave functionsDavid Robillard1-4/+4
This is needed for clipping. Unfortunately, the puglEnterContext() and puglLeaveContext() API was not suitable for this, but this shouldn't matter in user code because it is only used for setup, and is slated for removal anyway. Instead, just call the backend functions directly in the implementation.
2020-02-18X11: Use a single Cairo contextDavid Robillard1-22/+20
Cairo has a built-in cache that makes this fast enough to not matter, and it removes some state which is always good.
2019-11-21Rename "backend" headersDavid Robillard1-1/+1
Working on Vulkan clarified what has always been slightly smelly about the design and organization here: not everything that is API specific is really in a "backend" (a PuglBackend). The concrete example is puglGetProcAddress(), which only makes sense for GL and is actually implemented in the "backend" files. Arguably puglGetContext() is also such a thing. So, rename the headers so they can be the place where API-specific things go in general, which happens to include a backend most of the time. The stub is a bit of an exception to this, but whatever. The includes look tidier this way. In place of the old headers are compatibility stubs that just emit a warning and include the new version, which will be maintained for a while.
2019-11-03Move platform stub configuration code to platform headersDavid Robillard1-14/+1
This allows backends which use basic software rendering (like Cairo) to share the common basic window format setup code.
2019-09-07Clean up error handlingDavid Robillard1-14/+14
2019-09-03Add functions to get and set view size and positionDavid Robillard1-2/+2
2019-08-02Fix unnecessary conversionsDavid Robillard1-2/+2
2019-07-29X11: Implement double buffering for CairoDavid Robillard1-31/+66
Also save and restore cairo context state around callbacks, so applications don't need to worry about smashing cairo state across exposures.
2019-07-29Cleanup: Clean up includes and call IWYU in lint targetDavid Robillard1-0/+2
2019-07-29Reorganize source to separate private implementation detailsDavid Robillard1-0/+139
Taking a page from C++ convention, where "detail" is for things that should not be included in user code.