RESOLVED FIXED 13505
loses precision on x86_64
https://bugs.webkit.org/show_bug.cgi?id=13505
Summary loses precision on x86_64
Kulyk Nazar
Reported 2007-04-26 11:06:38 PDT
../../platform/graphics/cairo/GraphicsContextCairo.cpp:595: error: cast from ‘void*’ to ‘unsigned int’ loses precision On compiling gdk port on x86_64.
Attachments
graphicscontextcairo-user_data-fix.patch (1.45 KB, patch)
2007-04-26 11:08 PDT, Kulyk Nazar
mjs: review-
Use a stack of opacity values (2.38 KB, patch)
2007-04-26 14:49 PDT, Alp Toker
mjs: review+
Kulyk Nazar
Comment 1 2007-04-26 11:08:04 PDT
Created attachment 14205 [details] graphicscontextcairo-user_data-fix.patch Allocate float for user_set_ and _get_ data for opacity.
Alp Toker
Comment 2 2007-04-26 11:56:38 PDT
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
Maciej Stachowiak
Comment 3 2007-04-26 12:42:24 PDT
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.
Alp Toker
Comment 4 2007-04-26 14:49:19 PDT
Created attachment 14212 [details] Use a stack of opacity values
Maciej Stachowiak
Comment 5 2007-04-26 22:28:17 PDT
Comment on attachment 14212 [details] Use a stack of opacity values Noce, that's actually less code even. r=me
Mark Rowe (bdash)
Comment 6 2007-04-26 22:32:09 PDT
Landed in r21134.
Note You need to log in before you can comment on or make changes to this bug.