summaryrefslogtreecommitdiff
path: root/gdk/gdkcairocontext.c
Commit message (Collapse)AuthorAgeFilesLines
* *: Fix spelling mistakes found by codespellBjörn Daase2020-08-211-1/+1
|
* Fix some g-i annotation warningsRico Tzschichholz2018-05-011-1/+1
|
* cairocontext: Remove fallback implementationsBenjamin Otte2018-04-241-185/+16
| | | | | | | | | Now that all Cairo contexts are ported to managing cairo surfaces themselves, the old fallback code that didi the managing is no longer needed. Also clarify the behavior of gdk_cairo_context_cairo_create() wrt the vfunc by doing the early exit and the clipping outside of it.
* drawcontext: Add gdk_draw_context_in_frame() APIBenjamin Otte2018-04-241-1/+1
| | | | | | | | This makes the previous gdk_draw_context_is_drawing() function public under a new name. I decided against the old name because we use the term "frame" for a drawing operation, so I wanted to have this boolean flag reuse the term.
* gdk: Move begin/end_frame() functionsBenjamin Otte2018-04-241-3/+3
| | | | | | | | | | As they require a draw context and the draw context is already bound to the surface, it makes much more sense and reduces abiguity by moving these APIs to the draw context. As a side effect, we simplify GdkSurface APIs to a point where GdkSurface now does not concern itself with drawing anymore at all, apart from being the object that creates draw contexts.
* gdk: Get rid of GdkDrawingContextBenjamin Otte2018-04-241-7/+5
| | | | All information is kept in GdkDrawContext these days, so use that one.
* cairocontext: Turn cairo_create() function into a vfuncBenjamin Otte2018-04-241-23/+31
|
* gdk: Remove unused GL settingBenjamin Otte2018-04-241-1/+0
|
* gdk: Add Cairo context implementations for all backendsBenjamin Otte2018-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And make the GdkCairoContext as abstract. The idea of this and thje following commits is to get rid of all Cairo code in gdksurface.c (and $backend/gdksurface-$backend.c) by moving that code into the Cairo context files. In particular, the GdkSurfaceClass.begin_frame/end_frame() functions (which are currently exclusively used by the Cairo code should end up being moved to GdkDrawContextClass.begin/end_frame(). This has multiple benefits: 1. It unifies code between the different drawing contexts. GL lives in GLContext, Vulkan in VulkanContext and Cairo in CairoContext. In turn, this makes it way easier to reason about what's going on in surface-specific code. Currently pretty much all backends do things wrong when they want to sync to drawing or to the frame clock. 2. It makes the API of GdkSurface smaller. No drawing code (apart from creating the contexts) needs to remain. 3. It confines Cairo to the Drawcontext, thereby making it way more obvious when backends are still using it in situations where it may now conflict with OpenGL (like when doing the dnd failed animation or in the APIs that I'm removing in this branch). 4. We have 2 very different types of Cairo contexts: The X/win32 model, where we have a natively supported Cairo backend but do double buffering ourselves and use similar surfaces and the Wayland/Broadway model where we use image surfaces without any Cairo backend support and have to submit the buffers manually. By not sharing code between those 2 versions, we can make the actual code way smaller. We also get around the need to create 1x1 image surfaces in the Wayland backend where we pretend there's a native Cairo surface.
* cairocontext: Move a functionBenjamin Otte2018-04-241-0/+43
| | | | | A function of GdkDrawingContext is only used when drawing with Cairo, so move it to GdkCairoContext.
* gdk: Move Cairo code from surface to CairoContextBenjamin Otte2018-04-241-11/+134
| | | | This just moves code, no actual changes to functionality are happening.
* gdk: Add GdkCairoContextBenjamin Otte2018-04-241-0/+102
This does nothing but disallow passing NULL to gdk_surface_begin_paint() and instead require this context. The ultimate goal is to split out Cairo drawing into its own source file so it doesn't clutter up the generic rendering path.