Summary: | loses precision on x86_64 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kulyk Nazar <schamane> | ||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | ||||||||
Priority: | P2 | ||||||||
Version: | 523.x (Safari 3) | ||||||||
Hardware: | PC | ||||||||
OS: | Linux | ||||||||
Attachments: |
|
Description
Kulyk Nazar
2007-04-26 11:06:38 PDT
Created attachment 14205 [details]
graphicscontextcairo-user_data-fix.patch
Allocate float for user_set_ and _get_ data for opacity.
A few thoughts. You should remove the comment about storing the opacity value directly now that this isn't the case. The ASSERT(opacity >= 0 && opacity <= 1) checks are no longer relevant either. Also, we try to use C++ style casts rather than C style. I think you can do direct assignment and leave casting to void* until later, avoiding the memcpy (which has mis-formatted whitespace in your patch). The final patch will need a ChangeLog entry -- see the 'prepare-ChangeLog' script. Thanks Comment on attachment 14205 [details]
graphicscontextcairo-user_data-fix.patch
It's pretty inefficient to malloc the size of a single float; better to use a separate Vector<float> as a stack in the GraphicsContext.
Created attachment 14212 [details]
Use a stack of opacity values
Comment on attachment 14212 [details]
Use a stack of opacity values
Noce, that's actually less code even.
r=me
|