Re: Async Image - ImageData conversion

2015-06-26 Thread Boris Zbarsky
On 6/26/15 4:07 AM, Ashley Gullen wrote: I don't think we should extend HTMLImageElement because it is not available in workers. Adding the conversion methods to ImageBitmap allows workers to perform conversions using Blob (compressed image data) in the place of HTMLImageElement. Maybe I

Re: Async Image - ImageData conversion

2015-06-26 Thread Ashley Gullen
Gosh, I keep putting the wrong terms in and it really confuses things. I need to get better at writing clearly! I mentioned transferToImageBitmap when I meant transferToImageData. The parargraph from my second-last email should read: I like the suggestion that ImageBitmap be the hub of image

Re: Async Image - ImageData conversion

2015-06-26 Thread Ashley Gullen
I'm also wondering that if we have ImageBitmap.transferToImageData(), should we not also have ImageData.transferToImageBitmap()? Currently createImageBitmap(imageData) appears to require making a copy. On 26 June 2015 at 12:07, Ashley Gullen ash...@scirra.com wrote: I've updated the draft with

Re: Async Image - ImageData conversion

2015-06-26 Thread Justin Novosad
On Thu, Jun 25, 2015 at 4:57 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/24/15 1:28 PM, Ashley Gullen wrote: Note for devices with discrete GPUs, it's possible that ImageBitmap stores the decompressed image data in a GPU texture but does not have it in system RAM. Indeed. This is

Re: Async Image - ImageData conversion

2015-06-26 Thread Ashley Gullen
I've updated the draft with an ImageBitmap.transferToImageData() method: https://www.scirra.com/labs/specs/imagebitmap-conversion-extensions.html It's also used in Example 2 to demonstrate converting a Blob to an ImageData without redundantly copying the pixel data. I don't think we should extend

Re: Async Image - ImageData conversion

2015-06-26 Thread Justin Novosad
On Fri, Jun 26, 2015 at 7:07 AM, Ashley Gullen ash...@scirra.com wrote: I've updated the draft with an ImageBitmap.transferToImageData() method: https://www.scirra.com/labs/specs/imagebitmap-conversion-extensions.html It's also used in Example 2 to demonstrate converting a Blob to an

Re: Clipboard API: remove dangerous formats from mandatory data types

2015-06-26 Thread Wez
Florian, as I pointed out earlier, this proposal is to remove the requirement that user agents allow content to set the local system clipboard directly with certain pre-existing clipboard formats, because doing so safely is not possible in general. Removing the requirement from the spec will