| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
Previously, we wrapped all GtkCssShadowValues in a GtkCssShadowsValue,
even if it was just one shadow. This causes an unnecessary bloat in
css values.
Make each GtkCssShadowValue able to handle multiple shadows instead, and
use gtk_css_shadow_value* API everywhere.
|
|
|
|
|
|
|
|
| |
The differenciation between a literal color value and an RGBA value
caused problems in various situations. Just treat the two the same but
don't allow access to the rgba value of a non-literal color value.
This gets rid of around 1.6k rgba values in the widget-factory.
|
| |
|
|
|
|
|
| |
Just add the values manually when really using the snapshot later. Also
unifies the two if branches by pulling out getting the x/y values.
|
| |
|
|
|
|
|
|
| |
Instead of style + rect_of_one_box, pass the new GtkCssBoxes object.
This has the nice side effect that when drawing background + border +
outline, we only compute all the boxes we need once.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split out the code for computing CSS boxes from given variables from the
background render code. This way, it can be shared between different
codebases.
Also, make that code completely be contained of static inline functions.
That ensures that it can be 100% inlined in cases where only parts of
the rectangle are needed (like in gtk_widget_get_width() in the future).
This will require some more patches to actually work, but those will
follow.
|
|
|
|
| |
This removes a lot of duplicated code.
|
|
|
|
|
| |
Instead of every snapshot function having debug messages, have an
explicit gtk_snapshot_push_debug() function that appends a debug node.
|
|
|
|
|
| |
We iterate over all background layers twice, so only lookup blend mode
vlaues once.
|
| |
|
|
|
|
|
| |
We only call snapshot_color once, and this way it's clearer that nothing
will happen for a clear color from the caller side.
|
|
|
|
|
| |
Move the early returns up so we don't look up all those css values for
no reason.
|
|
|
|
| |
It's now called gtk_snapshot_offset().
|
|
|
|
|
|
| |
Instead of having gtk_snapshot_append_foo_node(), just have
gtk_snapshot_append_foo(). Nobody needs to know that this internally
uses nodes.
|
|
|
|
|
|
|
|
| |
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().
|
|
|
|
| |
and use it for backgrounds.
|
|
|
|
|
| |
Otherwise we do a lot of allocations and vprintf calls which are
not used.
|
|
|
|
|
|
|
| |
Also add gtk_snapshot_push_repeat() and use that to draw backgrounds.
With that change, CSS background snapshots are created without Cairo
nodes.
|
|
|
|
|
|
|
|
|
| |
Instead of making people intiialize a rectangle and then applying border
radius manually, provide a constructor that does it for them.
While doing that, also allow people to instead request the padding box
or the content box.
Refactor all relevant code to use this new constructor.
|
| |
|
|
|
|
|
|
|
| |
I want to use these inside GSK, and I'm not a fan of putting GdkRGBA
APIs into it or duplicating it into GTK.
So public API it is.
|
|
|
|
|
| |
... and replace _gtk_rounded_box_grow() and _gtk_rounded_box_shrink()
with it.
|
|
|
|
| |
Implement blend mode support in GTK background compositing with it.
|
| |
|
|
|
|
| |
We can now render most backgrounds fine.
|
|
|
|
|
|
|
| |
When the background-clip of the background is smaller than the
background-clip of blended images, not pushing a group is wrong.
Test testing exactly that included.
|
|
|
|
|
|
| |
Use gsk_rounded_rect_path() instead.
That's a private GSK function, be we can just include its header.
|
|
|
|
| |
Use GskRoundedRect instead.
|
| |
|
|
|
|
|
| |
The Graphene init macros can now be used for compound literals, which
means we need to update our mixed uses.
|
|
|
|
| |
We can query the blend mode inside the paint function.
|
|
|
|
|
|
|
| |
This decouples actual background drawing from shadow drawing in the
snapshot case.
We also now create seperate nodes for shadows vs for backgrounds.
|
| |
|
|
|
|
|
|
|
| |
and gtk_snapshot_render_frame() to be direct replacements for the
old gtk_render_*() functions.
Use them to replace Cairo usage completely in gtk_window_snapshot().
|
|
|
|
| |
Before, the shadows were clipped.
|
|
|
|
| |
We translated before.
|
|
|
|
|
|
| |
This is in preparation of making render nodes independent of the
renderer, so that they can be rendered multiple times with different
renderers.
|
|
|
|
|
| |
Use separate render nodes for each layer in a multi-image
background. WARNING: blend modes don't work right yet.
|
| |
|
|
|
|
|
| |
This is in preparation for creating separate render nodes
for individual backgrounds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CSS supports blend modes, in which a series of layers are
merged together according to the given operation or set of
operations.
Support for blend modes landed on Cairo, which exposes all
the commons and also the exquisites blend modes available.
Adding support for blend modes, then, is just a matter of
using the available Cairo operations.
This patch adds the background-blend-mode CSS enum property,
and adapts the background rendering code to blend the backgrounds
using the available blend modes when they're set.
https://bugzilla.gnome.org/show_bug.cgi?id=768305
|
|
|
|
|
| |
The new way, it no longer depends on the style context, but on the
CssStyle. This will become relevant in the next commit.
|
|
I want the gtkrender prefix for all filenames about rendering.
|