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>
Created attachment 201482 [details] Patch
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?
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.
Created attachment 201632 [details] Patch for landing
Committed r150040: <http://trac.webkit.org/changeset/150040>