Bug 37412 - [Qt] Sandbox resource handling in WebGL
Summary: [Qt] Sandbox resource handling in WebGL
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Jarkko Sakkinen
URL:
Keywords: Qt, QtTriaged
Depends on:
Blocks:
 
Reported: 2010-04-11 08:14 PDT by Jarkko Sakkinen
Modified: 2011-03-21 02:03 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jarkko Sakkinen 2010-04-11 08:14:13 PDT
WebGL context contains following resources:

- buffers
- framebuffers
- programs
- shaders 
- renderbuffers
- textures

In create methods GraphicsContext3D should return virtual resource handle instead of real resource handle for these because of the following reasons:
* Unshared WebGL context: framebuffer is visible from Javascript unless resources are sandboxed.
* Shared WebGL context: framebuffer and webview GL context resources are visible from JavaScript unless resources are sandboxed.
* Some Web pages might fail since they might assume resource IDs starting from zero.

Allocate and proxy virtual handles and map them to real resource handles instead in order to resolve this situation.
Comment 1 Jarkko Sakkinen 2010-04-11 08:15:06 PDT
I'm working on a patch for this. It is trivial to solve but requires some work.
Comment 2 Jarkko Sakkinen 2010-05-05 00:18:01 PDT
I think this is something that should be handled higher level than GraphicsContext3D implementation. Have to check if this already addressed in higher level WebGL code.
Comment 3 Jarkko Sakkinen 2011-03-21 02:03:29 PDT
WebGL resource management is handled in canvas code.