summaryrefslogtreecommitdiff
path: root/gtk/gtksnapshot.h
Commit message (Collapse)AuthorAgeFilesLines
* Convert headers to #pragma onceMatthias Clasen2023-03-311-3/+1
| | | | The conversion was done by guard2one.
* Make mask nodes more versatileMatthias Clasen2023-02-141-1/+2
| | | | | Add a GskMaskMode enumeration and implement it in the GL and cairo renderers.
* Add gtk_snapshot_push_maskMatthias Clasen2023-02-121-0/+3
|
* Add gtk_snapshot_append_scaled_textureMatthias Clasen2023-02-111-0/+5
| | | | | This is the snapshot api corresponding to gsk_texture_scale_node_new.
* Deprecate gtk_snapshot_render apisMatthias Clasen2022-10-121-37/+0
| | | | | | | | | | Move the implementations from gtksnapshot.c to gtk/deprecated/gtkrender.c and deprecated these functions. We want to get rid of them. These functions are still used in some of our widgetry, so use G_GNUC_BEGIN/END_IGNORE_DEPRECATIONS around them.
* snapshot: Add gsk_snapshot_append_conic_gradient()Benjamin Otte2020-12-031-0/+7
|
* GtkSnapshot: Add gtk_snapshot_push_glshader()Alexander Larsson2020-09-291-1/+7
|
* snapshot: switch to h/vradiusMatthias Clasen2020-09-181-4/+4
|
* snapshot: Add api for radial gradientsMatthias Clasen2020-09-181-0/+20
| | | | These are the equivalents of the linear gradient apis.
* Replace "gdouble" with "double"Benjamin Otte2020-07-251-16/+16
|
* transform: Add perspective()Benjamin Otte2019-03-051-0/+3
| | | | | This commit adds gsk_transform_perspective(), gtk_snapshot_perspective() and support for perspective() in the CSS syntax.
* transform: Move to GSKBenjamin Otte2019-03-041-1/+1
| | | | The renaming of the prefix makes this a large patch.
* snapshot: Remove the old APIsBenjamin Otte2019-02-211-7/+0
| | | | It's all using transforms now.
* snapshot: Introduce transform APIsBenjamin Otte2019-02-211-0/+32
| | | | | | | | | Instead of gtk_snapshot_offset(), provide a full set of functions kept in sync with GtkTransform APIs. On top of that, add gtk_snapshot_save() and gtk_snapshot_restore() mirroring cairo_save()/restore() that allow saving a snapshot's transform state.
* snapshot: Remove gtk_snapshot_get_offset()Benjamin Otte2019-02-211-5/+0
| | | | We use append() functions for everything now, thank you very much.
* snapshot: Add functions to append shadowsBenjamin Otte2019-02-211-0/+16
|
* snapshot: Add gtk_snapshot_append_border()Benjamin Otte2019-02-211-0/+5
| | | | This is adding functions for the remaining render nodes.
* snapshot: Remove superfluous typedefTimm Bäder2018-05-191-1/+0
| | | | | | We're already doing this in gtktypes.h Fixes #214
* snapshot: Redo debug messagesBenjamin Otte2018-04-241-69/+31
| | | | | Instead of every snapshot function having debug messages, have an explicit gtk_snapshot_push_debug() function that appends a debug node.
* snapshot: Don't handle clip anymoreBenjamin Otte2018-04-171-4/+0
| | | | | | | | | | If widgets want to clip things, they now need to do it themselves. By not taking care of clip, we avoid the need to track clip. And by not tracking clip, we can avoid all unnecessary cache invalidations that we were doing for render nodes whenever the clip changed. And when you are scrolling, the clip changes *a lot*.
* snapshot: Allow passing the bounds of the created paintableBenjamin Otte2018-04-051-2/+4
| | | | | | | | | | | This allows being more specific about the size. It's useful in particular when the resulting render nodes might be too small for the size, not only when they are too large. For the latter case, using a clip node would be enough. It also requires adding a clip node when rendering the resulting paintable, but that should be optimized out by GtkSnapshot when not necessary.
* snapshot: Track clip as a rect onlyBenjamin Otte2018-04-051-1/+1
|
* snapshot: Remove clip argument from gtk_snapshot_new()Benjamin Otte2018-04-051-2/+1
| | | | | It's not used anymore. And anybody who wants to have a clip on a newly created snapshot can achieve that using gtk_snapshot_push_clip().
* snapshot: Add gtk_snapshot_to_paintable()Benjamin Otte2018-03-261-0/+4
| | | | This is intended for DND icons
* snapshot: Export gtk_snapshot_append_layout()Benjamin Otte2018-03-261-0/+8
| | | | | | | This is the equivalent snapshot function to pango_cairo_show_layout(). Not to be confused with gtk_snapshot_render_layout(), which is the equivalent to gtk_render_layout().
* snapshot: Remove rendererBenjamin Otte2018-03-241-5/+2
| | | | | Now that there's no longer a need to keep the renderer around for Cairo rendering, don't do that then.
* snapshot: Turn into GObjectBenjamin Otte2018-03-181-4/+11
| | | | | | | This makes GdkSnapshot the base class for GtkSnapshot and hopefully stops confusing bindings. C code should see no difference to before.
* snapshot: Fix some indentationTimm Bäder2018-03-171-4/+4
|
* GtkSnapshot: Add gettersMatthias Clasen2018-03-111-0/+5
| | | | | These getters can be useful when creating new snapshots in a snapshot() vfunc.
* GtkSnapshot: Implement the builder patternMatthias Clasen2018-03-111-0/+20
| | | | | | Make GtkSnapshot a refcounted boxed type, and add public API that follows the builder pattern described here: https://blogs.gnome.org/otte/2018/02/03/builders/
* The big versioning cleanupMatthias Clasen2018-02-061-26/+26
| | | | | | | Remove all the old 2.x and 3.x version annotations. GTK+ 4 is a new start, and from the perspective of a GTK+ 4 developer all these APIs have been around since the beginning.
* snapshot: Add & use API for linear gradient nodesTimm Bäder2017-12-211-0/+19
| | | | | | This way, we can also clip the created node bounds to the current clip of the GtkSnapshot. This works as long as we don't modify the start and end points, and happens all the time while rendering.
* Drop gtk_snapshot_render_iconMatthias Clasen2017-11-291-6/+0
| | | | | Its not used, and we are working towards removing GdkPixbuf in the API.
* GskTexture => GdkTextureBenjamin Otte2017-11-041-1/+1
| | | | We want this thing to replace GdkPixbuf, so it has to live in GDK.
* Add gtk_snapshot_push_blur()Matthias Clasen2017-09-041-0/+5
| | | | | This function is similar to the other push functions. This one uses the newly created blur node.
* snapshot: Rename gtk_snapshot_translate_2d()Benjamin Otte2017-01-131-1/+1
| | | | It's now called gtk_snapshot_offset().
* snapshot: Rename append APIsBenjamin Otte2017-01-131-3/+3
| | | | | | Instead of having gtk_snapshot_append_foo_node(), just have gtk_snapshot_append_foo(). Nobody needs to know that this internally uses nodes.
* snapshot: Redo pop() APIBenjamin Otte2017-01-131-3/+1
| | | | | | | | gtk_snapshot_pop() => removed gtk_snapshot_pop_and_append() => gtk_snapshot_pop() So now there is no way to get a rendernode out of the snapshotting API until you gtk_snapshot_finish().
* snapshot: Add gtk_snapshot_push_blend()Benjamin Otte2017-01-131-0/+5
| | | | and use it for backgrounds.
* Add gtk_snapshot_push_cross_fade()Benjamin Otte2017-01-131-0/+5
| | | | | | | | ... and use it. The function is a bit awkward because it requires 2 calls to gtk_snapshot_pop(), but once you accept that, it's very convenient to use, as can be seen by the 2 implementations.
* GtkSnapshot: Always use int for the translationwip/alexl/snapshot-int-translateAlexander Larsson2017-01-111-3/+3
| | | | | | | | | | | | We already take ints when setting the translation, so it can't currently take any other values. Additionally, I was seeing large costs in int -> double -> int for the rects in gtk_snapshot_clips_rect(), as all callers really are ints (widget allocations) and the clip region is int-based. This change completely cleared a 2% rectangle_init_from_graphene from the profile and is likely to have nice performance effects elsewhere too.
* gsk: Add GskRepeatNodeBenjamin Otte2017-01-011-0/+6
| | | | | | | Also add gtk_snapshot_push_repeat() and use that to draw backgrounds. With that change, CSS background snapshots are created without Cairo nodes.
* snapshot: Add gtk_snapshot_push_color_matrix()Benjamin Otte2016-12-311-0/+6
| | | | So far, this is unused.
* gsk: Add GskShadowNodeBenjamin Otte2016-12-201-0/+6
| | | | | | | ... and make the icon rendering code use it. This requires moving even more shadow renering code into GSK, but so be it. At least the "shadows not implemented" warning is now gone!
* snapshot: Implement gtk_snapshot_push_opacity()Benjamin Otte2016-12-201-0/+5
| | | | Use it in GtkWidget's opacity handling.
* gsk: Add support for rounded clip rectanglesBenjamin Otte2016-12-201-0/+5
| | | | Also add support to GtkSnapshot, so people can push rounded clips.
* snapshot: Work on pushing and popping againBenjamin Otte2016-12-201-0/+12
| | | | | | | | | | | | | | | | | | | | | It is now possible to call push() subfunctions for simple container nodes with just a single child. So you can for example gtk_snapshot_push_clip() a clip region that all the nodes that get appended later will then obey. gtk_snapshot_pop() will then not return a container node, but a clip node containing the container node (and similar for the transform example). This is implemented internally by providing a "collect function" when pushing that is called when popping to collects all the accumulated nodes and combine them into the single node that gets returned. To simplify things even more, gtk_snapshot_pop_and_append() has been added, which pops the currently pushed node and appends it to the parent. The icon rendering code has been converted to this approach.
* snapshot: Make gtk_snapshot_get_renderer() privateBenjamin Otte2016-12-201-3/+0
| | | | | Public API doesn't need to be concerned with renderers. Worst case, they can use NULL instead of the actual renderer.
* snapshot: Add API for colors and texturesBenjamin Otte2016-12-201-0/+12
|
* snapshot: Change how gtk_snapshot_push/pop worksBenjamin Otte2016-12-201-5/+3
| | | | | | | | | | | | | | Instead of appending a container node and adding the nodes to it as they come in, we now collect the nodes until gtk_snapshot_pop() is called and then hand them out in a container node. The caller of gtk_snapshot_push() is then responsible for doing whatever he wants with the created node. Another addigion is the keep_coordinates flag to gtk_snapshot_push() which allows callers to keep the current offset and clip region or discard it. Discarding is useful when doing transforms, keeping it is useful when inserting effect nodes (like the ones I'm about to add).