Closed Bug 572300 Opened 15 years ago Closed 14 years ago

Use GLX_EXT_texture_from_pixmap in CanvasLayerOGL

Categories

(Core :: Graphics: CanvasWebGL, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: cjones, Assigned: cjones)

References

Details

Attachments

(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

  http://www.tojiart.com/WebGL/spore.html

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

  http://learningwebgl.com/lessons/example01/

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.
Assignee: nobody → jones.chris.g
Attachment #451511 - Flags: feedback?(vladimir)
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+
Attachment #452083 - Flags: review?(vladimir)
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.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: