The logic in ImageFrameGenerator regarding encoded image data is as follows: 1. When new data is received on the main thread, DeferredImageDecoder sets new data to ImageFrameGenerator. 2. ImageFrameGenerator makes a new copy of the data and keeps the reference. 3. When there is an image decoding request from LazyDecodingPixelRef, ImageFrameGenerator makes another copy of the data and take it for image decoding. The entire process has too many unnecessary memcpys, it should be cleaned up.
Created attachment 178331 [details] Patch
senorblanco, jamesr: Comments? This is the last big-ish change that is required for deferred image decoding. After this it will on par with existing main thread decoding stack.
Comment on attachment 178331 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=178331&action=review Looks good. r=me > Source/WebCore/platform/graphics/chromium/ThreadSafeDataTransport.h:39 > +// The purpose of this class is to allow transferring data stored in Grammar nit: "transferring" -> "the transfer of" > Source/WebCore/platform/graphics/chromium/ThreadSafeDataTransport.h:41 > +// SharedBuffer in a thread-safe manner. At the same time minimizing > +// memory copy and thread contention. Grammar nit: this is not a sentence. I'd just join it to the previous one: ".. thread-safe manner, and to minimize memory copies and thread contention."
Created attachment 179090 [details] Patch for landing
Comment on attachment 179090 [details] Patch for landing Clearing flags on attachment: 179090 Committed r137508: <http://trac.webkit.org/changeset/137508>
All reviewed patches have been landed. Closing bug.