RESOLVED INVALID49089
WebGL renderbuffers can still be uninitialized: need to set the viewport explicitly
https://bugs.webkit.org/show_bug.cgi?id=49089
Summary WebGL renderbuffers can still be uninitialized: need to set the viewport expl...
Benoit Jacob
Reported 2010-11-05 13:25:29 PDT
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
Benoit Jacob
Comment 1 2010-11-05 13:26:57 PDT
Not writing a patch, because I don't know how WebKit's WebGLFramebuffer objects can get their own dimensions.
Kenneth Russell
Comment 2 2010-11-05 15:51:16 PDT
I don't think so. The viewport doesn't affect glClear. The scissor rect does, however.
Zhenyao Mo
Comment 3 2010-11-05 15:55:52 PDT
I did disable scissor before and reset it back to original state after. See WebGLFramebuffer.cpp Should we close this bug?
Benoit Jacob
Comment 4 2010-11-15 10:52:30 PST
Indeed, sorry for the invalid report, thanks for the explanation.
Note You need to log in before you can comment on or make changes to this bug.