RE: [css3-images] exactly 2 adjacent colors stops

Firefox had some very slight rendering issues, and Chrome "does unusual things" on my 1000 stop sample page.  Interesting that the Webkit limit is beyond that.

I didn't explore much beyond 1000 because of some expected limitations in other subsystems related to property value string length, etc.  As far as the Gradients feature itself, we haven't drilled in depth (much less documented) what the IE10 limits will be just yet.


Simple example:
 linear-gradient(red 5px, blue 15px);
The color at 0 is an interpolated value between red and blue that the IE code isn't involved with directly.  D2D does this interpolation on our behalf.  Yes, the product code *could* have a redundant-with-D2D interpolator but we'd like to avoid that for a few reasons.

You can't just slide them (in general) if you want to have the graphics infrastructure do color interpolation rather than the product code.

We can discuss in more detail in private mail if you'd like.

-Brian

> -----Original Message-----
> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> Sent: Tuesday, May 24, 2011 10:44 AM
> To: Brian Manthos
> Cc: Alan Gresley; Philippe Wittenbergh; www-style list; Brad Kemper
> Subject: Re: [css3-images] exactly 2 adjacent colors stops
> 
> On Tue, May 24, 2011 at 10:37 AM, Brian Manthos
> <brianman@microsoft.com> wrote:
> > From an implementation perspective there is a cost though.  I don't
> know what it is like for other graphics libraries (and didn't go
> looking), but for D2D the CSS concept doesn't map directly.  The
> consequence of the CSS approach is that the mapping to D2D is more
> complex for CSS repeating gradients that start away from 0 than for
> those that start at 0.
> >
> > I'm less worried about the performance impact of this, than I am
> about the author limitation aspect.  Essentially you end up cutting
> your maximum stop count in half to do the mapping.
> 
> I assume that's because you end up using a signed integer to number
> the stops instead of an unsigned, right?  Why is this a limitation?
> You can WLOG shift the stops so that the first is on or before 0, at
> least for rendering purposes.
> 
> Also, out of curiosity, what *is* the maximum stop count in IE10PP1?
> I know that FF and Webkit allow at least 2000 stops, because I tested
> that much in a silly example.
> 
> ~TJ

Received on Tuesday, 24 May 2011 18:02:14 UTC