flypig.co.uk

List items

Items from the current list are shown below.

Blog

16 Jun 2024 : Day 260 #
I'm getting well into the swing of things now, doing my best to get to the bottom of the WebGL issue. Yesterday I tried removing some changes I made in the last commit. Today I'll be placing breakpoints on methods to find out which get hit and which sail through without incident.

A key difference I'm interested in is whether the methods get hit while running the browser on a page that displays WebGL content. Most of the methods should already be used when running a WebView — that is, after all, their purpose — and in theory few of them should be used — by default — by the browser. That's because they were added specifically to be used for offscreen rendering, which is what the WebView is all about.

The exception is WebGL which also uses offscreen rending, so it's the methods that are used on both the WebView and the browser that are of interest to us today.

I've been testing a few out. For example the following SharedSurfaceTextureClient constructor is used by the WebView, but not by the Sailfish Browser. Here it is being hit when executing the WebView:
Thread 37 "Compositor" hit Breakpoint 1, mozilla::layers::
    SharedSurfaceTextureClient::SharedSurfaceTextureClient (this=0x7ee01ab110, 
    aData=0x7ee01ab060, 
    aFlags=34, aAllocator=0x0)
    at ${PROJECT}/gecko-dev/gfx/layers/client/TextureClientSharedSurface.cpp:105
105     ${PROJECT}/gecko-dev/gfx/layers/client/TextureClientSharedSurface.cpp: 
    No such file or directory.
(gdb) 
This surprised me a little because I thought it'd be used for offscreen rendering more generally. But apparently not. I can conclude that this method is unlikely to be the source of the WebGL problems.

In contrast, I found that the following method is neither used by the WebView nor the browser:
(gdb) info break    
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   0x0000007ff28c14fc in mozilla::gl::
    CreateEmulatorBufferSurface(mozilla::gl::GLLibraryEGL*, void*, mozilla::gfx:
    :IntSizeTyped<mozilla::gfx::UnknownUnits>&) at ${PROJECT}/gecko-dev/gfx/gl/
    GLContextProviderEGL.cpp:982
This is also surprising. I thought maybe that I should therefore think about getting rid of this method entirely, but then I realised there's a reason for this method existing: it's intended for use with native rendering and for the emulator. These are both cases I've not yet tested, but they're still important for Sailfish OS. I added these to try to map ESR 78 changes and while I've not tested them I cam only hope they work, which is still preferable to not including them at all.

The following is the CreateEGLPBufferOffscreenContextImpl() method used by the WebView, but which appears not to be used by the browser:
Thread 38 &quot;Compositor&quot; hit Breakpoint 2, mozilla::gl::GLContextEGL::
    CreateEGLPBufferOffscreenContextImpl (
    egl=std::shared_ptr<mozilla::gl::EglDisplay> (use count 3, weak count 2) = 
    {...}, desc=..., size=..., useGles=useGles@entry=false, 
    out_failureId=out_failureId@entry=0x7f1f94c1c8)
    at ${PROJECT}/gecko-dev/gfx/gl/GLContextProviderEGL.cpp:1359
1359    ${PROJECT}/gecko-dev/gfx/gl/GLContextProviderEGL.cpp: No such file or 
    directory.
(gdb) bt
#0  mozilla::gl::GLContextEGL::CreateEGLPBufferOffscreenContextImpl (egl=std::
    shared_ptr<mozilla::gl::EglDisplay> (use count 3, weak count 2) = {...}, 
    desc=..., size=..., useGles=useGles@entry=false, 
    out_failureId=out_failureId@entry=0x7f1f94c1c8)
    at ${PROJECT}/gecko-dev/gfx/gl/GLContextProviderEGL.cpp:1359
#1  0x0000007ff112f9f8 in mozilla::gl::GLContextEGL::
    CreateEGLPBufferOffscreenContext (
    display=std::shared_ptr<mozilla::gl::EglDisplay> (use count 3, weak count 
    2) = {...}, desc=..., size=..., 
    out_failureId=out_failureId@entry=0x7f1f94c1c8)
    at include/c++/8.3.0/ext/atomicity.h:96
#2  0x0000007ff112fbcc in mozilla::gl::GLContextProviderEGL::CreateHeadless (
    desc=..., out_failureId=out_failureId@entry=0x7f1f94c1c8)
    at include/c++/8.3.0/ext/atomicity.h:96
#3  0x0000007ff1130454 in mozilla::gl::GLContextProviderEGL::CreateOffscreen (
    size=..., 
    flags=flags@entry=mozilla::gl::CreateContextFlags::REQUIRE_COMPAT_PROFILE, 
    out_failureId=out_failureId@entry=0x7f1f94c1c8)
    at ${PROJECT}/gecko-dev/gfx/gl/GLContextProviderEGL.cpp:1456
#4  0x0000007ff1198048 in mozilla::layers::CompositorOGL::CreateContext (
    this=this@entry=0x7ed4002f50)
    at ${PROJECT}/gecko-dev/gfx/layers/opengl/CompositorOGL.cpp:250
#5  0x0000007ff11ad820 in mozilla::layers::CompositorOGL::Initialize (
    this=0x7ed4002f50, out_failureReason=0x7f1f94c520)
    at ${PROJECT}/gecko-dev/gfx/layers/opengl/CompositorOGL.cpp:387
#6  0x0000007ff12c359c in mozilla::layers::CompositorBridgeParent::
    NewCompositor (this=this@entry=0x7fc4b671f0, aBackendHints=...)
    at ${PROJECT}/gecko-dev/gfx/layers/ipc/CompositorBridgeParent.cpp:1493
#7  0x0000007ff12ce618 in mozilla::layers::CompositorBridgeParent::
    InitializeLayerManager (this=this@entry=0x7fc4b671f0, aBackendHints=...)
    at ${PROJECT}/gecko-dev/gfx/layers/ipc/CompositorBridgeParent.cpp:1436
#8  0x0000007ff12ce748 in mozilla::layers::CompositorBridgeParent::
    AllocPLayerTransactionParent (this=this@entry=0x7fc4b671f0, 
    aBackendHints=..., aId=...)
    at ${PROJECT}/gecko-dev/gfx/layers/ipc/CompositorBridgeParent.cpp:1546
#9  0x0000007ff3665368 in mozilla::embedlite::EmbedLiteCompositorBridgeParent::
    AllocPLayerTransactionParent (this=0x7fc4b671f0, aBackendHints=..., 
    aId=...)
    at ${PROJECT}/gecko-dev/mobile/sailfishos/embedthread/
    EmbedLiteCompositorBridgeParent.cpp:80
#10 0x0000007ff0c5f2f0 in mozilla::layers::PCompositorBridgeParent::
    OnMessageReceived (this=0x7fc4b671f0, msg__=...) at 
    PCompositorBridgeParent.cpp:1285
[...]
#25 0x0000007ff6a0289c in ?? () from /lib64/libc.so.6
(gdb) 
As you can see I've captured a backtrace; I'm honestly not expecting it to be useful but I'd rather keep it just in case.

I've checked a few methods now but this is beginning to feel like a rather hit and miss approach: debugging as Brownian motion. I'm not averse to a bit of Brownian debugging, but I prefer something more structured if there's an alternative available. To this end, rather than testing methods individually I've now placed all of the following breakpoints on the executing browser to find out which ones hit:
1   mozilla::gl::GLScreenBuffer::Create(mozilla::gl::GLContext*, mozilla::gfx::
    IntSizeTyped<mozilla::gfx::UnknownUnits> const&)
    at ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:171
2   mozilla::gl::GLScreenBuffer::GLScreenBuffer(mozilla::gl::GLContext*,
    mozilla::UniquePtr<mozilla::gl::SurfaceFactory, mozilla::DefaultDelete
    <mozilla::gl::SurfaceFactory> >) 
    at ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:183
3   mozilla::gl::GLScreenBuffer::Swap(mozilla::gfx::IntSizeTyped<mozilla::
    gfx::UnknownUnits> const&)
    at ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:308
4   mozilla::gl::GLScreenBuffer::Resize(mozilla::gfx::IntSizeTyped<mozilla::
    gfx::UnknownUnits> const&)
    at ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:339
5   mozilla::gl::ReadBuffer::Attach(mozilla::gl::SharedSurface*)
    at ${PROJECT}/gecko-dev/gfx/gl/GLScreenBuffer.cpp:408
6   mozilla::gl::TileGenFunc
    at ${PROJECT}/gecko-dev/gfx/gl/GLTextureImage.cpp:352
7   mozilla::gl::SurfaceFactory_Basic::SurfaceFactory_Basic(mozilla::gl::
    GLContext&)
    at ${PROJECT}/gecko-dev/gfx/gl/SharedSurfaceGL.cpp:43
7.2 mozilla::gl::SurfaceFactory_Basic::SurfaceFactory_Basic(mozilla::gl::
    GLContext*, mozilla::layers::TextureFlags const&)
    at ${PROJECT}/gecko-dev/gfx/gl/SharedSurfaceGL.cpp:47
8   mozilla::gl::SharedSurface_Basic::Create(mozilla::gl::GLContext*,
    mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&)
    at ${PROJECT}/gecko-dev/gfx/gl/SharedSurfaceGL.cpp:56
9   GLFormatForImage
10  GLTypeForImage
11  TextureImageEGL::TextureImageEGL
12  TextureImageEGL::BindTexture
13  TextureImageEGL::BindTexImage
14  mozilla::gl::CreateTextureImageEGL(mozilla::gl::GLContext*, mozilla::gfx::
    IntSizeTyped<mozilla::gfx::UnknownUnits> const&, gfxContentType, unsigned 
    int, mozilla::gl::TextureImage::Flags, mozilla::gfx::SurfaceFormat)
    at ${PROJECT}/gecko-dev/gfx/gl/TextureImageEGL.cpp:185
15  mozilla::layers::SharedSurfaceTextureClient::Create(mozilla::UniquePtr
    <mozilla::gl::SharedSurface, mozilla::DefaultDelete<mozilla::gl::
    SharedSurface> >, mozilla::gl::SurfaceFactory*, mozilla::layers::
    LayersIPCChannel*, mozilla::layers::TextureFlags)
    at ${PROJECT}/gecko-dev/gfx/layers/client/TextureClientSharedSurface.cpp:114
16  mozilla::layers::CompositorOGL::CreateContext()
    at ${PROJECT}/gecko-dev/gfx/layers/opengl/CompositorOGL.cpp:227
17  mozilla::layers::CompositorOGL::ClearRect(mozilla::gfx::RectTyped<mozilla::
    gfx::UnknownUnits, float> const&)
    at ${PROJECT}/gecko-dev/gfx/layers/opengl/CompositorOGL.cpp:766
I get some results back. Each time something hits I've recorded a backtrace, since these are the really crucial methods I need to look into. I won't have time to look in to them today, but I can at least take a record of their details. First up is CompositorOGL::CreateContext(). This is a totally new method added as part of my changes, so a good candidate for where the issue might live:
Thread 37 &quot;Compositor&quot; hit Breakpoint 16, mozilla::layers::
    CompositorOGL::CreateContext (this=this@entry=0x7ed8002f10)
    at ${PROJECT}/gecko-dev/gfx/layers/opengl/CompositorOGL.cpp:227
227     ${PROJECT}/gecko-dev/gfx/layers/opengl/CompositorOGL.cpp: No such file 
    or directory.
(gdb) bt
#0  mozilla::layers::CompositorOGL::CreateContext (this=this@entry=0x7ed8002f10)
    at ${PROJECT}/gecko-dev/gfx/layers/opengl/CompositorOGL.cpp:227
#1  0x0000007ff2950820 in mozilla::layers::CompositorOGL::Initialize (
    this=0x7ed8002f10, out_failureReason=0x7f2e4ed510)
    at ${PROJECT}/gecko-dev/gfx/layers/opengl/CompositorOGL.cpp:387
#2  0x0000007ff2a6659c in mozilla::layers::CompositorBridgeParent::
    NewCompositor (this=this@entry=0x7fc8a7e820, aBackendHints=...)
    at ${PROJECT}/gecko-dev/gfx/layers/ipc/CompositorBridgeParent.cpp:1493
#3  0x0000007ff2a71618 in mozilla::layers::CompositorBridgeParent::
    InitializeLayerManager (this=this@entry=0x7fc8a7e820, aBackendHints=...)
    at ${PROJECT}/gecko-dev/gfx/layers/ipc/CompositorBridgeParent.cpp:1436
#4  0x0000007ff2a71748 in mozilla::layers::CompositorBridgeParent::
    AllocPLayerTransactionParent (this=this@entry=0x7fc8a7e820, 
    aBackendHints=..., aId=...)
    at ${PROJECT}/gecko-dev/gfx/layers/ipc/CompositorBridgeParent.cpp:1546
#5  0x0000007ff4e08368 in mozilla::embedlite::EmbedLiteCompositorBridgeParent::
    AllocPLayerTransactionParent (this=0x7fc8a7e820, aBackendHints=..., 
    aId=...)
    at ${PROJECT}/gecko-dev/mobile/sailfishos/embedthread/
    EmbedLiteCompositorBridgeParent.cpp:80
#6  0x0000007ff24022f0 in mozilla::layers::PCompositorBridgeParent::
    OnMessageReceived (this=0x7fc8a7e820, msg__=...) at 
    PCompositorBridgeParent.cpp:1285
[...]
#21 0x0000007fefbac89c in ?? () from /lib64/libc.so.6
(gdb)
Next we have the SurfaceFactory_Basic constructor. This isn't new but has an updated signature. This seems less likely to be the cause, but worth checking just in case.
Thread 8 &quot;GeckoWorkerThre&quot; hit Breakpoint 7, mozilla::gl::
    SurfaceFactory_Basic::SurfaceFactory_Basic (this=0x7e9c005810, gl=...)
    at ${PROJECT}/gecko-dev/gfx/gl/SharedSurfaceGL.cpp:43
43      ${PROJECT}/gecko-dev/gfx/gl/SharedSurfaceGL.cpp: No such file or 
    directory.
(gdb) bt
#0  mozilla::gl::SurfaceFactory_Basic::SurfaceFactory_Basic (this=0x7e9c005810, 
    gl=...)
    at ${PROJECT}/gecko-dev/gfx/gl/SharedSurfaceGL.cpp:43
#1  0x0000007ff369ce20 in mozilla::MakeUnique<mozilla::gl::
    SurfaceFactory_Basic, mozilla::gl::GLContext&> ()
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/cxxalloc.h:33
#2  mozilla::WebGLContext::Present (this=this@entry=0x7fc961d590, 
    xrFb=<optimized out>, 
    consumerType=consumerType@entry=mozilla::layers::TextureType::Unknown, 
    webvr=webvr@entry=false)
    at ${PROJECT}/gecko-dev/dom/canvas/WebGLContext.cpp:929
#3  0x0000007ff3664e68 in mozilla::HostWebGLContext::Present (webvr=false, 
    t=mozilla::layers::TextureType::Unknown, xrFb=<optimized out>, 
    this=<optimized out>) at ${PROJECT}/obj-build-mer-qt-xr/dist/include/
    mozilla/RefPtr.h:280
#4  mozilla::ClientWebGLContext::Run<void (mozilla::HostWebGLContext::*)(
    unsigned long, mozilla::layers::TextureType, bool) const, &(mozilla::
    HostWebGLContext::Present(unsigned long, mozilla::layers::TextureType, 
    bool) const), unsigned long, mozilla::layers::TextureType const&, bool 
    const&> (
    this=<optimized out>, args#0=@0x7fdf2926c0: 0, args#1=@0x7fdf2926bf: 
    mozilla::layers::TextureType::Unknown, args#2=@0x7fdf2926be: false)
    at ${PROJECT}/gecko-dev/dom/canvas/ClientWebGLContext.cpp:313
#5  0x0000007ff3664fd0 in mozilla::ClientWebGLContext::Present (
    this=this@entry=0x7fc9611ef0, xrFb=xrFb@entry=0x0, type=<optimized out>, 
    webvr=<optimized out>, webvr@entry=false)
    at ${PROJECT}/gecko-dev/dom/canvas/ClientWebGLContext.cpp:363
#6  0x0000007ff36907e0 in mozilla::ClientWebGLContext::OnBeforePaintTransaction 
    (this=0x7fc9611ef0)
    at ${PROJECT}/gecko-dev/dom/canvas/ClientWebGLContext.cpp:345
#7  0x0000007ff28ffc7c in mozilla::layers::CanvasRenderer::
    FirePreTransactionCallback (this=this@entry=0x7fc989b9a0)
    at ${PROJECT}/gecko-dev/gfx/layers/CanvasRenderer.cpp:75
[...]
#54 0x0000007fefbac89c in ?? () from /lib64/libc.so.6
(gdb) 
Similarly for SharedSurface_Basic::Create(). The sequencing here makes perfect sense: first you'd want to create a factory, next up you'd want to use it to create an instance of the object it's designed to create, which is exactly what we've just seen above. Here we have a SurfaceFactory_Basic that's generating a SharedSurface_Basic object:
Thread 8 &quot;GeckoWorkerThre&quot; hit Breakpoint 8, mozilla::gl::
    SharedSurface_Basic::Create (gl=0x7fc985a8e0, size=...)
    at ${PROJECT}/gecko-dev/gfx/gl/SharedSurfaceGL.cpp:56
56      in ${PROJECT}/gecko-dev/gfx/gl/SharedSurfaceGL.cpp
(gdb) bt
#0  mozilla::gl::SharedSurface_Basic::Create (gl=0x7fc985a8e0, size=...)
    at ${PROJECT}/gecko-dev/gfx/gl/SharedSurfaceGL.cpp:56
#1  0x0000007ff28a6578 in mozilla::gl::SurfaceFactory_Basic::CreateSharedImpl (
    this=<optimized out>, desc=...)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/WeakPtr.h:185
#2  0x0000007ff28a6488 in mozilla::gl::SurfaceFactory::CreateShared (
    this=0x7e9c005810, size=...)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/RefCounted.h:240
#3  0x0000007ff28a9504 in mozilla::gl::SwapChain::Acquire (
    this=this@entry=0x7fc961da28, size=...)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/UniquePtr.h:290
#4  0x0000007ff369ca3c in mozilla::WebGLContext::PresentInto (
    this=this@entry=0x7fc961d590, swapChain=...)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/UniquePtr.h:290
#5  0x0000007ff369ce6c in mozilla::WebGLContext::Present (
    this=this@entry=0x7fc961d590, xrFb=<optimized out>, 
    consumerType=consumerType@entry=mozilla::layers::TextureType::Unknown, 
    webvr=webvr@entry=false)
    at ${PROJECT}/gecko-dev/dom/canvas/WebGLContext.cpp:936
#6  0x0000007ff3664e68 in mozilla::HostWebGLContext::Present (webvr=false, 
    t=mozilla::layers::TextureType::Unknown, xrFb=<optimized out>, 
    this=<optimized out>) at ${PROJECT}/obj-build-mer-qt-xr/dist/include/
    mozilla/RefPtr.h:280
#7  mozilla::ClientWebGLContext::Run<void (mozilla::HostWebGLContext::*)(
    unsigned long, mozilla::layers::TextureType, bool) const, &(mozilla::
    HostWebGLContext::Present(unsigned long, mozilla::layers::TextureType, 
    bool) const), unsigned long, mozilla::layers::TextureType const&, bool 
    const&> (
    this=<optimized out>, args#0=@0x7fdf2926c0: 0, args#1=@0x7fdf2926bf: 
    mozilla::layers::TextureType::Unknown, args#2=@0x7fdf2926be: false)
    at ${PROJECT}/gecko-dev/dom/canvas/ClientWebGLContext.cpp:313
#8  0x0000007ff3664fd0 in mozilla::ClientWebGLContext::Present (
    this=this@entry=0x7fc9611ef0, xrFb=xrFb@entry=0x0, type=<optimized out>, 
    webvr=<optimized out>, webvr@entry=false)
    at ${PROJECT}/gecko-dev/dom/canvas/ClientWebGLContext.cpp:363
#9  0x0000007ff36907e0 in mozilla::ClientWebGLContext::OnBeforePaintTransaction 
    (this=0x7fc9611ef0)
    at ${PROJECT}/gecko-dev/dom/canvas/ClientWebGLContext.cpp:345
[...]
#57 0x0000007fefbac89c in ?? () from /lib64/libc.so.6
(gdb) 
Next we have a call to CreateTextureImageEGL(). It's not clear to me how this relates to the earlier calls; I think this may be one to look in to in a bit more depth:
Thread 37 &quot;Compositor&quot; hit Breakpoint 14, mozilla::gl::
    CreateTextureImageEGL (gl=gl@entry=0x7ed81a29e0, aSize=...,
    aContentType=aContentType@entry=gfxContentType::COLOR_ALPHA, 
    aWrapMode=aWrapMode@entry=33071,
    aFlags=aFlags@entry=mozilla::gl::TextureImage::OriginBottomLeft, 
    aImageFormat=aImageFormat@entry=mozilla::gfx::SurfaceFormat::B8G8R8A8)
    at ${PROJECT}/gecko-dev/gfx/gl/TextureImageEGL.cpp:185
185     ${PROJECT}/gecko-dev/gfx/gl/TextureImageEGL.cpp: No such file or 
    directory.
(gdb) bt
#0  mozilla::gl::CreateTextureImageEGL (gl=gl@entry=0x7ed81a29e0, aSize=..., 
    aContentType=aContentType@entry=gfxContentType::COLOR_ALPHA, 
    aWrapMode=aWrapMode@entry=33071, aFlags=aFlags@entry=mozilla::gl::
    TextureImage::OriginBottomLeft, 
    aImageFormat=aImageFormat@entry=mozilla::gfx::SurfaceFormat::B8G8R8A8)
    at ${PROJECT}/gecko-dev/gfx/gl/TextureImageEGL.cpp:185
#1  0x0000007ff28b9154 in mozilla::gl::CreateTextureImage (
    gl=gl@entry=0x7ed81a29e0, aSize=..., 
    aContentType=aContentType@entry=gfxContentType::COLOR_ALPHA, 
    aWrapMode=aWrapMode@entry=33071, 
    aFlags=aFlags@entry=mozilla::gl::TextureImage::OriginBottomLeft, 
    aImageFormat=<optimized out>)
    at ${PROJECT}/gecko-dev/gfx/gl/GLTextureImage.cpp:30
#2  0x0000007ff294e9d4 in mozilla::layers::TextureImageTextureSourceOGL::Update 
    (this=0x7ed81a2940, aSurface=0x7ed822aa70, aDestRegion=0x0, 
    aSrcOffset=0x0, aDstOffset=0x0) at ${PROJECT}/obj-build-mer-qt-xr/dist/
    include/gfx2DGlue.h:70
#3  0x0000007ff2a43bf4 in mozilla::layers::BufferTextureHost::Upload (
    this=this@entry=0x7ed81fca30, aRegion=<optimized out>)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/RefPtr.h:313
#4  0x0000007ff2a4422c in mozilla::layers::BufferTextureHost::MaybeUpload (
    this=this@entry=0x7ed81fca30, aRegion=<optimized out>)
    at ${PROJECT}/gecko-dev/gfx/layers/composite/TextureHost.cpp:1046
#5  0x0000007ff2a44554 in mozilla::layers::BufferTextureHost::UploadIfNeeded (
    this=this@entry=0x7ed81fca30)
    at ${PROJECT}/gecko-dev/gfx/layers/composite/TextureHost.cpp:1031
#6  0x0000007ff2a44570 in mozilla::layers::BufferTextureHost::Lock (
    this=0x7ed81fca30)
    at ${PROJECT}/gecko-dev/gfx/layers/composite/TextureHost.cpp:650
#7  0x0000007ff2a35ad8 in mozilla::layers::ImageHost::Lock (this=0x7ed81fbe20)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/RefPtr.h:313
#8  0x0000007ff2a35f68 in mozilla::layers::AutoLockCompositableHost::
    AutoLockCompositableHost (aHost=0x7ed81fbe20, this=0x7f2e4ecca0)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/RefPtr.h:313
#9  mozilla::layers::ImageHost::Composite (this=this@entry=0x7ed81fbe20, 
    aCompositor=aCompositor@entry=0x7ed8002f10, 
    aLayer=aLayer@entry=0x7ed81db4d0, 
    aEffectChain=..., aOpacity=1, aTransform=..., aSamplingFilter=<optimized 
    out>, aClipRect=..., aVisibleRegion=aVisibleRegion@entry=0x0, aGeometry=...)
    at ${PROJECT}/gecko-dev/gfx/layers/composite/ImageHost.cpp:197
#10 0x0000007ff2a26a88 in mozilla::layers::CanvasLayerComposite::<lambda(
    mozilla::layers::EffectChain&, const IntRect&)>::operator() (clipRect=..., 
    effectChain=..., __closure=<synthetic pointer>)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/MaybeStorageBase.h:50
#11 mozilla::layers::RenderWithAllMasks<mozilla::layers::CanvasLayerComposite::
    RenderLayer(const IntRect&, const mozilla::Maybe<mozilla::gfx::
    PolygonTyped<mozilla::gfx::UnknownUnits> >&)::<lambda(mozilla::layers::
    EffectChain&, const IntRect&)> >(mozilla::layers::Layer *, mozilla::layers::
    Compositor *, const mozilla::gfx::IntRect &, mozilla::layers::
    CanvasLayerComposite::<lambda(mozilla::layers::EffectChain&, const 
    IntRect&)>) (aLayer=aLayer@entry=
    0x7ed81db0c0, aCompositor=<optimized out>, aClipRect=..., 
    aRenderCallback=aRenderCallback@entry=...)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/layers/
    LayerManagerCompositeUtils.h:69
#12 0x0000007ff2a26ddc in mozilla::layers::CanvasLayerComposite::RenderLayer (
    this=0x7ed81db0c0, aClipRect=..., aGeometry=...)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/RefPtr.h:289
#13 0x0000007ff2a32cd4 in mozilla::layers::RenderLayers<mozilla::layers::
    ContainerLayerComposite> (aContainer=aContainer@entry=0x7ed81f1600, 
    aManager=aManager@entry=0x7ed81a44e0, aClipRect=..., aGeometry=...)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/Maybe.h:443
[...]
#41 0x0000007fefbac89c in ?? () from /lib64/libc.so.6
(gdb) 
Next up we have a call to TileGenFunc(). You may recall that we already fixed this to align its functionality with the code as it was before the last commit, so this one should already be safe. I'll still keep its backtrace here though, both for completeness and in case I missed something earlier:
Thread 37 &quot;Compositor&quot; hit Breakpoint 6, 0x0000007ff28b8b88 in 
    mozilla::gl::TileGenFunc (aImageFormat=<optimized out>, aFlags=<optimized 
    out>,
    aContentType=<optimized out>, aSize=..., gl=<optimized out>)
    at ${PROJECT}/gecko-dev/gfx/gl/GLTextureImage.cpp:352
352     ${PROJECT}/gecko-dev/gfx/gl/GLTextureImage.cpp: No such file or 
    directory.
(gdb) bt
#0  0x0000007ff28b8b88 in mozilla::gl::TileGenFunc (aImageFormat=<optimized 
    out>, aFlags=<optimized out>, aContentType=<optimized out>, aSize=..., 
    gl=<optimized out>) at ${PROJECT}/gecko-dev/gfx/gl/GLTextureImage.cpp:352
#1  mozilla::gl::TiledTextureImage::Resize (this=this@entry=0x7ed81b5b10, 
    aSize=...)
    at ${PROJECT}/gecko-dev/gfx/gl/GLTextureImage.cpp:402
#2  0x0000007ff28b8fd0 in mozilla::gl::TiledTextureImage::TiledTextureImage (
    this=0x7ed81b5b10, aGL=0x7ed81a29e0, aSize=..., 
    aContentType=<optimized out>, aFlags=<optimized out>, 
    aImageFormat=<optimized out>)
    at ${PROJECT}/gecko-dev/gfx/gl/GLTextureImage.cpp:224
#3  0x0000007ff28d4908 in mozilla::gl::CreateTextureImageEGL (
    gl=gl@entry=0x7ed81a29e0, aSize=..., 
    aContentType=aContentType@entry=gfxContentType::COLOR_ALPHA, 
    aWrapMode=aWrapMode@entry=33071, 
    aFlags=aFlags@entry=mozilla::gl::TextureImage::OriginBottomLeft, 
    aImageFormat=aImageFormat@entry=mozilla::gfx::SurfaceFormat::B8G8R8A8)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/cxxalloc.h:33
#4  0x0000007ff28b9154 in mozilla::gl::CreateTextureImage (
    gl=gl@entry=0x7ed81a29e0, aSize=..., 
    aContentType=aContentType@entry=gfxContentType::COLOR_ALPHA, 
    aWrapMode=aWrapMode@entry=33071, 
    aFlags=aFlags@entry=mozilla::gl::TextureImage::OriginBottomLeft, 
    aImageFormat=<optimized out>)
    at ${PROJECT}/gecko-dev/gfx/gl/GLTextureImage.cpp:30
#5  0x0000007ff294e9d4 in mozilla::layers::TextureImageTextureSourceOGL::Update 
    (this=0x7ed81a2940, aSurface=0x7ed822aa70, aDestRegion=0x0, 
    aSrcOffset=0x0, aDstOffset=0x0) at ${PROJECT}/obj-build-mer-qt-xr/dist/
    include/gfx2DGlue.h:70
#6  0x0000007ff2a43bf4 in mozilla::layers::BufferTextureHost::Upload (
    this=this@entry=0x7ed81fca30, aRegion=<optimized out>)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/RefPtr.h:313
#7  0x0000007ff2a4422c in mozilla::layers::BufferTextureHost::MaybeUpload (
    this=this@entry=0x7ed81fca30, aRegion=<optimized out>)
    at ${PROJECT}/gecko-dev/gfx/layers/composite/TextureHost.cpp:1046
#8  0x0000007ff2a44554 in mozilla::layers::BufferTextureHost::UploadIfNeeded (
    this=this@entry=0x7ed81fca30)
    at ${PROJECT}/gecko-dev/gfx/layers/composite/TextureHost.cpp:1031
#9  0x0000007ff2a44570 in mozilla::layers::BufferTextureHost::Lock (
    this=0x7ed81fca30)
    at ${PROJECT}/gecko-dev/gfx/layers/composite/TextureHost.cpp:650
#10 0x0000007ff2a35ad8 in mozilla::layers::ImageHost::Lock (this=0x7ed81fbe20)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/RefPtr.h:313
#11 0x0000007ff2a35f68 in mozilla::layers::AutoLockCompositableHost::
    AutoLockCompositableHost (aHost=0x7ed81fbe20, this=0x7f2e4ecca0)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/RefPtr.h:313
#12 mozilla::layers::ImageHost::Composite (this=this@entry=0x7ed81fbe20, 
    aCompositor=aCompositor@entry=0x7ed8002f10, 
    aLayer=aLayer@entry=0x7ed81db4d0, 
    aEffectChain=..., aOpacity=1, aTransform=..., aSamplingFilter=<optimized 
    out>, aClipRect=..., aVisibleRegion=aVisibleRegion@entry=0x0, aGeometry=...)
    at ${PROJECT}/gecko-dev/gfx/layers/composite/ImageHost.cpp:197
#13 0x0000007ff2a26a88 in mozilla::layers::CanvasLayerComposite::<lambda(
    mozilla::layers::EffectChain&, const IntRect&)>::operator() (clipRect=..., 
    effectChain=..., __closure=<synthetic pointer>)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/MaybeStorageBase.h:50
#14 mozilla::layers::RenderWithAllMasks<mozilla::layers::CanvasLayerComposite::
    RenderLayer(const IntRect&, const mozilla::Maybe<mozilla::gfx::
    PolygonTyped<mozilla::gfx::UnknownUnits> >&)::<lambda(mozilla::layers::
    EffectChain&, const IntRect&)> >(mozilla::layers::Layer *, mozilla::layers::
    Compositor *, const mozilla::gfx::IntRect &, mozilla::layers::
    CanvasLayerComposite::<lambda(mozilla::layers::EffectChain&, const 
    IntRect&)>) (
    aLayer=aLayer@entry=0x7ed81db0c0, aCompositor=<optimized out>, 
    aClipRect=..., aRenderCallback=aRenderCallback@entry=...)
    at ${PROJECT}/obj-build-mer-qt-xr/dist/include/mozilla/layers/
    LayerManagerCompositeUtils.h:69
[...]
#44 0x0000007fefbac89c in ?? () from /lib64/libc.so.6
(gdb) 
Phew: that's a lot to check. Plenty to look in to, but as I mentioned at the outset, this is just the preliminary info-capturing work. I'll do my best to use this information tomorrow when I plan to investigate it all in much more depth. That's it for now though. More tomorrow.

If you'd like to read any of my other gecko diary entries, they're all available on my Gecko-dev Diary page.

Comments

Uncover Disqus comments