Emmanuele Bassi
4cbe079767
Use Graphene init macros for compound literals
...
The Graphene init macros can now be used for compound literals, which
means we need to update our mixed uses.
2016-11-21 16:21:38 +00:00
Benjamin Otte
b93c26f559
render: Refactor background drawing code
...
We can query the blend mode inside the paint function.
2016-11-19 21:28:18 +01:00
Benjamin Otte
38f226b5ce
render: Propagate snapshot drawing to box shadows
...
This decouples actual background drawing from shadow drawing in the
snapshot case.
We also now create seperate nodes for shadows vs for backgrounds.
2016-11-19 20:58:36 +01:00
Benjamin Otte
c22a9a03f9
renderbackground: Remove unused functions
2016-11-16 19:31:47 +01:00
Benjamin Otte
79d2d0e40d
snapshot: Add gtk_snapshot_render_background()
...
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().
2016-11-15 17:48:45 +01:00
Benjamin Otte
a54db5adcd
render: Draw shadows outside of potential push_group() call
...
Before, the shadows were clipped.
2016-11-08 02:32:29 +01:00
Benjamin Otte
f9da4f0270
render: Clip the correct rectangle
...
We translated before.
2016-11-08 02:32:29 +01:00
Benjamin Otte
a0e63b8a07
rendernode: Require passing a renderer to get_draw_context()
...
This is in preparation of making render nodes independent of the
renderer, so that they can be rendered multiple times with different
renderers.
2016-11-01 16:32:26 +01:00
Matthias Clasen
39c1aa5e27
Split css background into individual render nodes
...
Use separate render nodes for each layer in a multi-image
background. WARNING: blend modes don't work right yet.
2016-10-18 11:49:15 +01:00
Matthias Clasen
b660361fb7
Don't create render nodes for empty backgrounds
2016-10-18 11:49:14 +01:00
Matthias Clasen
cffb8ae4b5
Break out the css background render node in a function
...
This is in preparation for creating separate render nodes
for individual backgrounds.
2016-10-18 11:49:14 +01:00
Georges Basile Stavracas Neto
369db4a406
css: add background-blend-mode support
...
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
2016-07-03 17:24:47 -04:00
Benjamin Otte
71a9fd9d83
stylecontext: Move background_is_opaque() function
...
The new way, it no longer depends on the style context, but on the
CssStyle. This will become relevant in the next commit.
2016-02-25 16:52:58 +01:00
Benjamin Otte
5cc0cae4b7
render: Rename gtkthemingbackground.[ch]
...
I want the gtkrender prefix for all filenames about rendering.
2015-01-20 06:30:18 +01:00