Comment 20 for bug 1583849

Revision history for this message
In , Martin Husemann (ub71a5bwcb7k-6kfa0n-b69y0hv8hgzd) wrote :

Probably same or similar underlying issue as bug 986328, I see flashing display and lots of "crash reporter logs":

Crash Annotation GraphicsCriticalError: |[0][GFX1]: Unknown image format 0 (t=4.86961)|[25246][GFX1]: Unknown image format 0 (t=904.76)|[25242][GFX1]:

coming from:

#6 mozilla::gfx::GfxFormatToCairoFormat (format=format@entry=mozilla::gfx::SurfaceFormat::B8G8R8A8)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/gfx/2d/HelpersCairo.h:163
#7 0xfffffffff3751e84 in GfxFormatToCairoFormat (format=mozilla::gfx::SurfaceFormat::B8G8R8A8)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/gfx/2d/HelpersCairo.h:152
#8 mozilla::gfx::CreateSubImageForData (aData=<optimized out>, aRect=..., aStride=<optimized out>, aFormat=<optimized out>)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/gfx/2d/DrawTargetCairo.cpp:283
#9 0xfffffffff37521fc in mozilla::gfx::GetCairoSurfaceForSourceSurface (aSurface=<optimized out>, aExistingOnly=aExistingOnly@entry=false,
    aSubImage=...) at /usr/pkgobj/www/firefox/work/firefox-46.0/gfx/2d/DrawTargetCairo.cpp:384
#10 0xfffffffff3752684 in mozilla::gfx::GfxPatternToCairoPattern (aPattern=..., aAlpha=<optimized out>, aTransform=...)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/gfx/2d/DrawTargetCairo.cpp:507
#11 0xfffffffff3752efc in mozilla::gfx::DrawTargetCairo::DrawPattern (this=this@entry=0xffffffffdc662520, aPattern=..., aStrokeOptions=...,
    aOptions=..., aDrawType=aDrawType@entry=mozilla::gfx::DrawTargetCairo::DRAW_FILL, aPathBoundsClip=<optimized out>)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/gfx/2d/DrawTargetCairo.cpp:961
#12 0xfffffffff3754d74 in mozilla::gfx::DrawTargetCairo::FillRect (this=0xffffffffdc662520, aRect=..., aPattern=..., aOptions=...)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/gfx/2d/DrawTargetCairo.cpp:1057
#13 0xfffffffff387c000 in gfxSurfaceDrawable::DrawInternal (this=this@entry=0xffffffffdda47100, aDrawTarget=aDrawTarget@entry=0xffffffffdc662520,
    aOp=aOp@entry=mozilla::gfx::CompositionOp::OP_OVER, aAntialiasMode=<optimized out>, aFillRect=..., aSamplingRect=..., aExtendMode=<optimized out>,
    aFilter=<optimized out>, aOpacity=<optimized out>, aTransform=...) at /usr/pkgobj/www/firefox/work/firefox-46.0/gfx/thebes/gfxDrawable.cpp:106
#14 0xfffffffff387c23c in gfxSurfaceDrawable::Draw (this=this@entry=0xffffffffdda47100, aContext=aContext@entry=0xffffffffdc776e80, aFillRect=...,
    aExtendMode=aExtendMode@entry=mozilla::gfx::ExtendMode::CLAMP, aFilter=@0xffffffffffff81a8: mozilla::gfx::Filter::GOOD, aOpacity=<optimized out>,
    aTransform=...) at /usr/pkgobj/www/firefox/work/firefox-46.0/gfx/thebes/gfxDrawable.cpp:77
#15 0xfffffffff38da684 in gfxUtils::DrawPixelSnapped (aContext=aContext@entry=0xffffffffdc776e80, aDrawable=<optimized out>, aImageSize=...,
    aRegion=..., aFormat=<optimized out>, aFilter=aFilter@entry=mozilla::gfx::Filter::GOOD, aImageFlags=<optimized out>, aOpacity=1)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/gfx/thebes/gfxUtils.cpp:694
#16 0xfffffffff3910c7c in mozilla::image::imgFrame::Draw (this=0xffffffffe6f36480, aContext=aContext@entry=0xffffffffdc776e80, aRegion=...,
    aFilter=aFilter@entry=mozilla::gfx::Filter::GOOD, aImageFlags=aImageFlags@entry=96)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/image/imgFrame.cpp:605
#17 0xfffffffff38eca9c in mozilla::image::RasterImage::DrawInternal(mozilla::image::DrawableFrameRef&&, gfxContext*, mozilla::gfx::IntSizeTyped<mozilla::gfx::UnknownUnits> const&, mozilla::image::ImageRegion const&, mozilla::gfx::Filter, unsigned int) (this=this@entry=0xffffffffdda42320,
    aFrameRef=aFrameRef@entry=<unknown type in /usr/pkgobj/www/firefox/work/build/dist/bin/libxul.so, CU 0x767b279, DIE 0x7715d42>,
    aContext=aContext@entry=0xffffffffdc776e80, aSize=..., aRegion=..., aFilter=aFilter@entry=mozilla::gfx::Filter::GOOD, aFlags=96)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/image/RasterImage.cpp:1460
#18 0xfffffffff38ecc34 in mozilla::image::RasterImage::Draw (this=0xffffffffdda42320, aContext=0xffffffffdc776e80, aSize=..., aRegion=...,
    aWhichFrame=<optimized out>, aFilter=<optimized out>, aFlags=96) at /usr/pkgobj/www/firefox/work/firefox-46.0/image/RasterImage.cpp:1526
#19 0xfffffffff4bd1f54 in DrawImageInternal (aContext=..., aPresContext=aPresContext@entry=0xffffffffe09ac800, aImage=0xffffffffdda42320,
    aGraphicsFilter=aGraphicsFilter@entry=mozilla::gfx::Filter::GOOD, aDest=..., aFill=..., aAnchor=..., aDirty=..., aSVGContext=0x0, aImageFlags=96,
    aExtendMode=mozilla::gfx::ExtendMode::CLAMP) at /usr/pkgobj/www/firefox/work/firefox-46.0/layout/base/nsLayoutUtils.cpp:6467
#20 0xfffffffff4bd2dfc in nsLayoutUtils::DrawSingleImage (aContext=..., aPresContext=aPresContext@entry=0xffffffffe09ac800,
    aImage=aImage@entry=0xffffffffdda42320, aGraphicsFilter=<optimized out>, aDest=..., aDirty=..., aSVGContext=0x0, aImageFlags=64, aAnchorPoint=0x0,
    aSourceArea=0x0) at /usr/pkgobj/www/firefox/work/firefox-46.0/layout/base/nsLayoutUtils.cpp:6571
#21 0xfffffffff4d4d1bc in nsImageBoxFrame::PaintImage (this=0xffffffffdd9cdc78, aRenderingContext=..., aDirtyRect=..., aPt=..., aFlags=<optimized out>)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/layout/xul/nsImageBoxFrame.cpp:397
#22 0xfffffffff4d4d360 in nsDisplayXULImage::Paint (this=0xffffffffdc7f2b28, aBuilder=0xffffffffffff9a08, aCtx=0xffffffffffff8ed0)
    at /usr/pkgobj/www/firefox/work/firefox-46.0/layout/xul/nsImageBoxFrame.cpp:410

which looks like:

static inline cairo_format_t
GfxFormatToCairoFormat(SurfaceFormat format)
{
  switch (format)
  {
    case SurfaceFormat::A8R8G8B8_UINT32:
      return CAIRO_FORMAT_ARGB32;
    case SurfaceFormat::X8R8G8B8_UINT32:
      return CAIRO_FORMAT_RGB24;
    case SurfaceFormat::A8:
      return CAIRO_FORMAT_A8;
    case SurfaceFormat::R5G6B5_UINT16:
      return CAIRO_FORMAT_RGB16_565;
    default:
      gfxCriticalError() << "Unknown image format " << (int)format;
      return CAIRO_FORMAT_ARGB32;
  }
}

I'd be happy to create/test patches, but I do not understand the "big picture" right now - what is supposed to happen where?