W3C home > Mailing lists > Public > www-style@w3.org > October 2011

RE: [css-shaders] Feedback about default fragment shader in CSS shaders proposal

From: <noam.rosenthal@nokia.com>
Date: Tue, 18 Oct 2011 19:31:21 +0000
To: <cmarrin@apple.com>
CC: <www-style@w3.org>
Message-ID: <9DCC9DB73CE0234F821B00AF47F30CE7A7BDAA@008-AM1MPN1-026.mgdnok.nokia.com>

________________________________________
From: ext Chris Marrin [cmarrin@apple.com]

> For instance, we will always use hardware-based ancestors for a hardware-based element. But again, I don't see how the presence of opacity in the CSS-shaded element affects this. Is there an optimization I'm not seeing?

Possibly, let me explain :) 
The way we optimize this in WebKit-Qt is that we only use an FBO when the element has an opaque ancestor AND other elements that overlap it.
In cases where the semi-transparent item is standalone, we simply draw to the target surface (in most cases the actual window), using an opacity uniform in the shader.
Due to performance reasons, we only use FBOs when it's absolutely necessary. If we could use this type optimization for CSS-shaded elements, we'd gain a lot in cases where the CSS-shaded element is semi-transparent but has no overlapping items.

Imagine the following document:

<div style="opacity:1; -webkit-transition-property: opacity; ...">
     <div style="some-css-shader" />
</div>

The outer div has a fade-in/out effect, and it contains a CSS-shaded element. There's no inherent reason to use an FBO here during the transition, unless the default shader forces us to blend in two passes...
I hope this makes it a bit clearer :)

--
No'am
Received on Tuesday, 18 October 2011 19:32:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:34:58 UTC