Bug 49089
| Summary: | WebGL renderbuffers can still be uninitialized: need to set the viewport explicitly | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Benoit Jacob <bjacob> |
| Component: | WebGL | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | bjacob, cmarrin, enne, kbr, zmo |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | All | ||
| OS: | All | ||
Benoit Jacob
This is a variant of bug 48351.
I believe that WebGLFramebuffer::initializeRenderbuffers() needs to set the viewport to (0,0,w,h) where w and h are the width and height of the framebuffer. Otherwise, if the user had set a tiny viewport, the glClear call here fails to initialize the renderbuffer, allowing video memory readback as in bug 48351.
We just fixed this in Mozilla:
http://hg.mozilla.org/mozilla-central/file/3769e11d18d6/content/canvas/src/WebGLContext.h#l1533
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Benoit Jacob
Not writing a patch, because I don't know how WebKit's WebGLFramebuffer objects can get their own dimensions.
Kenneth Russell
I don't think so. The viewport doesn't affect glClear. The scissor rect does, however.
Zhenyao Mo
I did disable scissor before and reset it back to original state after.
See WebGLFramebuffer.cpp
Should we close this bug?
Benoit Jacob
Indeed, sorry for the invalid report, thanks for the explanation.