[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Should texImage2D and texSubImage2D accept more element types?



On Wed, May 30, 2012 at 12:02 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 5/30/12 2:27 PM, Kenneth Russell wrote:
>>
>> I have very little experience with SVG, but looking at
>> https://svgwg.org/svg2-draft/struct.html#ImageElement (is that the
>> right place for the current draft), I see no support for CORS. Does
>> the SVG spec have the same notions of same-origin content, tainting,
>> etc. that HTML and Canvas do?
>
>
> <svg:image> in Gecko supports CORS just like <html:img>.
>
> The SVG WG has expressed interest in adding that to the spec, but may not
> have gotten around to it yet.
>
> In any case, with or without CORS, UAs have the concepts of same-origin for
> SVG images.

OK.

In my opinion it isn't worth adding SVGImageElement support to the
WebGL spec until the SVG spec defines CORS support. Until it does,
SVGImageElements would be much less useful than HTMLImageElements for
uploading texture data to WebGL.

I don't see any point in supporting uploading image type
HTMLInputElements and HTMLObjects as textures. Who would realistically
load images that way? I think it would only increase confusion and add
more corner case code that could potentially break. On the other hand,
I think that adding support for using full HTML rendering results as
textures in a safe manner that isn't susceptible to side-channel
timing attacks would be a great direction.

-Ken

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------