Closed Bug 572300 Opened 12 years ago Closed 12 years ago

Use GLX_EXT_texture_from_pixmap in CanvasLayerOGL


(Core :: Canvas: WebGL, defect)

Not set





(Reporter: cjones, Assigned: cjones)




(2 files, 1 obsolete file)

This enables rendering WebGL canvas with OGL layers (at all).  In theory, this should keep the canvas pixels in VRAM, with no intermediate readback, but perf with this extension used isn't quite where I would have expected.  As compared to the BasicLayers impl (with readback), sometimes OGL layers won, sometimes they lost.  (The comparison isn't particular meaningful because ThebesLayerOGL isn't particularly optimized yet.)  But for example, on this demo

OGL canvas does *much* better than Basic canvas, >2x better framerate on my machine.  And on this demo,

OGL canvas does *much* worse.  (I'll start profiling to see what turns up.)

If this initial approach isn't just plain wrong, I think it's worth getting checked in so that we have /some/ rendering path for WebGL on GLX.
Comment on attachment 451511 [details] [diff] [review]
Use GLX_EXT_texture_from_pixmap to render WebGL canvases in CanvasLayerOGL

This looks fine, but this supposes that GLX Pixmaps are used instead of PBuffers (572297); the performance issues that you're seeing are largely as a result of that, because as far as I know GLX Pixmaps are not optimized anywhere.
Attachment #451511 - Flags: feedback?(vladimir) → feedback+
Comment on attachment 452083 [details] [diff] [review]
Use GLX_EXT_texture_from_pixmap to render WebGL canvases in CanvasLayerOGL

This patch is rotted by bug 575469, but GLX was also broken by 575469 so I can't test an updated version.  Will revisit later.
Attachment #452083 - Attachment is obsolete: true
Attachment #452083 - Flags: review?(vladimir)
WFM in OGL-accelerated windows after bug 580101.  We still might want to dust off GLX_EXT_texture_from_pixmap for cross-process sharing, but that's future work.
Closed: 12 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.