Experiments with <canvas>.toBlob
Created attachment 113139 [details]
Experiment uno: multiple threads.
Created attachment 113142 [details]
Experiment due: sequential workqueue.
I prefer the sequential workqueue approach, it simpler to reason about and provides good sequential performance with no thread contention unlike the "experiment uno".
Parts of "experiment due" dealt with the mimeType detection changes in HTMLCanvasElement.cpp and changes to the toDataURL() area of ImageBufferSkia.cpp. These made the patch harder to read. I cut them out and submitted them separately to focus the patch on the toBlob() idea. FIXME notes suggest the changes needed to the toBlob() spec prose.
Created attachment 119856 [details]
Patch: sequential workqueue.
How is this related to bug 51652?
(In reply to comment #4)
> Created an attachment (id=119856) [details]
> Patch: sequential workqueue.
Is this patch for review? Are you still working on this bug? Thanks.
This is still open from 2011!
Are the people assigned to this ticket still the right ones to implement it or maybe it need to be reassigned?
When I try to save 41Mpixel images, Chrome crashes. Currently we have to allocate more memory to run through the intermediate ASCII buffer returned by toDataURL and use the Uint8Array to convert in binary.
This is the only thing that prevent us to make our WebGL picture editor works with images bigger than 20Mpixels. Regarding the rest, it is actually better and faster than Lightroom.
Chrome has implemented this:
I'm not sure if there is standards support yet.
*** This bug has been marked as a duplicate of bug 148878 ***
(In reply to comment #8)
> Chrome has implemented this:
> I'm not sure if there is standards support yet.
Mentioned on the duped-to bug, standards prose is there. I used the patch on this bug to inform and help write the spec prose (with Ian Hickson).