Re: [css4-color] Make the r/g/b components be <number> rather than <integer>?

Le 09/06/2012 01:01, Tab Atkins Jr. a écrit :
>> >I'd be inclined to say there might be advantages to not defining
>> >rounding behavior here.  The experience I've seen with color
>> >management on different platforms has been that they round
>> >differently, but being off by one color component doesn't sound all
>> >that serious.  Being able to benefit from hardware acceleration may
>> >outweigh being able to define every result exactly.
> Given that this kind of rounding could happen at parse-time, I'm not
> sure I understand how hw-accel comes into this.  By the time the
> hardware sees the color, it's already been converted to a packed argb
> format, right?

It could happen at parse-time, or it could happen later. cairo for 
example take 3 or 4 floating point numbers in 0..1 for RGB(A), so 
WeasyPrint and tinycss convert to that when parsing. There may be some 
rounding later, but I think it is not the same across backends.

-- 
Simon Sapin

Received on Saturday, 9 June 2012 07:00:03 UTC