GNOME Bugzilla – Bug 768305
Gtk+ should support background-blend-mode
Last modified: 2016-07-03 23:43:07 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.
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.
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.
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.
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.
Created attachment 330796 [details] [review] css: add documentation for background-blend-mode Fixed documentation.
Created attachment 330797 [details] [review] demo: add a demo for blend modes Improved the demo by adding the ducky blends from the spec.