RESOLVED FIXED 115981
toDataURL can return an empty image in some cases
https://bugs.webkit.org/show_bug.cgi?id=115981
Summary toDataURL can return an empty image in some cases
Dean Jackson
Reported 2013-05-12 00:49:42 PDT
In some accelerated rendering cases, toDataURL can produce an empty image on canvas elements, especially if that canvas element is not on-screen. <rdar://problem/13760256>
Attachments
Patch (3.86 KB, patch)
2013-05-12 00:53 PDT, Dean Jackson
no flags
Patch for landing (7.48 KB, patch)
2013-05-13 14:11 PDT, Dean Jackson
no flags
Dean Jackson
Comment 1 2013-05-12 00:53:57 PDT
Darin Adler
Comment 2 2013-05-12 01:20:48 PDT
Comment on attachment 201482 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=201482&action=review > Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp:453 > + CGContextFlush(context()->platformContext()); > +#if !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED == 1070 > + m_data.m_lastFlushTime = currentTimeMS(); > +#endif Could we make this share code with the ImageBuffer::context flush? Or is that not worth it?
Dean Jackson
Comment 3 2013-05-12 08:23:24 PDT
Comment on attachment 201482 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=201482&action=review >> Source/WebCore/platform/graphics/cg/ImageBufferCG.cpp:453 >> +#endif > > Could we make this share code with the ImageBuffer::context flush? Or is that not worth it? There were a bunch of places which called flush in this manner. I did consider gathering them all so that we didn't have the ugly #if spewing across the whole file. I'll take another look before committing.
Dean Jackson
Comment 4 2013-05-13 14:11:37 PDT
Created attachment 201632 [details] Patch for landing
Dean Jackson
Comment 5 2013-05-13 14:30:12 PDT
Note You need to log in before you can comment on or make changes to this bug.