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
This commit is contained in:
Georges Basile Stavracas Neto
2016-07-01 09:54:23 -03:00
committed by Matthias Clasen
parent c8a74a1f50
commit 369db4a406
6 changed files with 240 additions and 3 deletions

View File

@ -27,6 +27,10 @@
G_BEGIN_DECLS
GtkCssValue * _gtk_css_blend_mode_value_new (GtkCssBlendMode blend_mode);
GtkCssValue * _gtk_css_blend_mode_value_try_parse (GtkCssParser *parser);
GtkCssBlendMode _gtk_css_blend_mode_value_get (const GtkCssValue *value);
GtkCssValue * _gtk_css_border_style_value_new (GtkBorderStyle border_style);
GtkCssValue * _gtk_css_border_style_value_try_parse (GtkCssParser *parser);
GtkBorderStyle _gtk_css_border_style_value_get (const GtkCssValue *value);