RESOLVED WONTFIX 63946
[Qt] Offscreen rendering does not render WebGL canvas
https://bugs.webkit.org/show_bug.cgi?id=63946
Summary [Qt] Offscreen rendering does not render WebGL canvas
Andrew Wason
Reported 2011-07-05 10:58:59 PDT
Created attachment 99727 [details] sample application to reproduce the issue I have a QGraphicsWebView with a QGLWidget viewport. Loading a page with a WebGL canvas and rendering to a QGLFramebufferObject via a QPainter renders the page to the FBO but not the canvas. The canvas alone gets rendered to the QGLWidget viewport instead of the FBO. Sample application is attached. This first paints to a QPainter wrapping a QGLFramebufferObject, this only paints the non-canvas content, saved as paintFBO-FBO.png. It then saves the QGLWidget as paintFBO-QGLWidget.png - and this contains the canvas content only. It then paints to a QPainter wrapping the QGLWidget viewport, this paints the entire page properly, saved as paintQGLWidget.png. This is using TextureMapperGL and GraphicsContext3DInternal::paintToTextureMapper() does get called - but the wrong drawing surface must be bound at this point (i.e. the QGLWidget instead of the FBO).
Attachments
sample application to reproduce the issue (2.40 KB, application/zip)
2011-07-05 10:58 PDT, Andrew Wason
no flags
result of painting to QGLWidget - entire page is painted (5.58 KB, image/png)
2011-07-05 11:01 PDT, Andrew Wason
no flags
result of painting to FBO - only non-canvas content is painted (3.74 KB, image/png)
2011-07-05 11:01 PDT, Andrew Wason
no flags
result of painting to FBO - canvas is painted to the QGLWidget instead (580 bytes, image/png)
2011-07-05 11:02 PDT, Andrew Wason
no flags
testcase (4.57 KB, patch)
2011-08-12 07:42 PDT, Andrew Wason
no flags
Andrew Wason
Comment 1 2011-07-05 11:01:05 PDT
Created attachment 99728 [details] result of painting to QGLWidget - entire page is painted
Andrew Wason
Comment 2 2011-07-05 11:01:44 PDT
Created attachment 99729 [details] result of painting to FBO - only non-canvas content is painted
Andrew Wason
Comment 3 2011-07-05 11:02:18 PDT
Created attachment 99731 [details] result of painting to FBO - canvas is painted to the QGLWidget instead
Andrew Wason
Comment 4 2011-07-15 12:03:01 PDT
It looks like the problem is in TextureMapperGL::bindSurface() - if surface is 0, it does glBindFramebuffer(0) - binding the default framebuffer (the QGLWidget) instead of the FBO we are painting to.
Andrew Wason
Comment 5 2011-08-12 07:42:32 PDT
Created attachment 103770 [details] testcase Add testcases for painting to FBO and QImage to tst_qgraphicswebview.cpp
Brent Fulgham
Comment 6 2014-01-09 20:55:53 PST
The QT port is no longer part of WebKit.
Note You need to log in before you can comment on or make changes to this bug.