After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 768305 - Gtk+ should support background-blend-mode
Gtk+ should support background-blend-mode
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-07-02 00:19 UTC by Georges Basile Stavracas Neto
Modified: 2016-07-03 23:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
css: add background-blend-mode support (12.18 KB, patch)
2016-07-02 00:20 UTC, Georges Basile Stavracas Neto
none Details | Review
css: add documentation for background-blend-mode (3.06 KB, patch)
2016-07-02 00:20 UTC, Georges Basile Stavracas Neto
none Details | Review
demo: add a demo for blend modes (91.85 KB, patch)
2016-07-02 00:20 UTC, Georges Basile Stavracas Neto
none Details | Review
css: add background-blend-mode support (14.52 KB, patch)
2016-07-02 17:01 UTC, Georges Basile Stavracas Neto
none Details | Review
css: add documentation for background-blend-mode (2.70 KB, patch)
2016-07-02 17:02 UTC, Georges Basile Stavracas Neto
none Details | Review
demo: add a demo for blend modes (409.47 KB, patch)
2016-07-02 17:03 UTC, Georges Basile Stavracas Neto
none Details | Review

Description Georges Basile Stavracas Neto 2016-07-02 00:19:54 UTC
Support for CSS blending modes is easy for the background
case, and completely supported by Cairo operations. The
following patches implement support for that CSS property.
Comment 1 Georges Basile Stavracas Neto 2016-07-02 00:20:00 UTC
Created attachment 330761 [details] [review]
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.
Comment 2 Georges Basile Stavracas Neto 2016-07-02 00:20:05 UTC
Created attachment 330762 [details] [review]
css: add documentation for background-blend-mode

After introducing the new CSS property, it is natural to
add some documentation explaining the behavior of it and
our support coverage.
Comment 3 Georges Basile Stavracas Neto 2016-07-02 00:20:11 UTC
Created attachment 330763 [details] [review]
demo: add a demo for blend modes

After introducing the CSS blend mode enum values and including
the background-blend-mode CSS property, it is very important to
actually provide an example of the new feature.

This patch adds a new demo to gtk3-demo which shows how the
background-blend-mode CSS property works.
Comment 4 Georges Basile Stavracas Neto 2016-07-02 17:01:43 UTC
Created attachment 330795 [details] [review]
css: add background-blend-mode support

Per Benjamin's comments, fixed the patch by push_group()/pop_group()ing the context when needed.
Comment 5 Georges Basile Stavracas Neto 2016-07-02 17:02:05 UTC
Created attachment 330796 [details] [review]
css: add documentation for background-blend-mode

Fixed documentation.
Comment 6 Georges Basile Stavracas Neto 2016-07-02 17:03:06 UTC
Created attachment 330797 [details] [review]
demo: add a demo for blend modes

Improved the demo by adding the ducky blends from the spec.