Closed Bug 1009722 Opened 10 years ago Closed 8 years ago

Skia content + OMTC Basic Layers + Linux = blank window

Categories

(Core :: Graphics, defect)

Other Branch
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: bjacob, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

STR:
  1) Be on Linux
  2) Use Skia content
  3) Use OMTC basic layers
Result: entirely blank browser window. It's still clicky, though, and clicking at the right place brings up the tooltips (probably separate layers, as they have css transforms).

It works fine if you change any of these 3 factors:
 - If you try on Windows instead of Linux, it works (with Skia content and OMTC basic)
 - If you use Cairo content instead of Skia content, it works (With Linux and OMTC basic)
 - If you use old main-thread basic layers instead of OMTC basic layers, it works (on Linux with Skia content).

The xrender preference does not make a difference.
For reference:

layers.acceleration.disabled = true
layers.offmainthreadcomposition.enabled = true
layers.offmainthreadcomposition.force-basic = true
Matt theorised that it's because EndRemoteDrawing() in nsWindowGtk wasn't implemented. A quick hack to implement it with a system that calls Put() on mShmImage passing mGdkWindow as the target didn't show anything. (This is with xrender disabled)
(In reply to Benoit Jacob [:bjacob] from comment #0)
> It works fine if you change any of these 3 factors:
>  - If you try on Windows instead of Linux, it works (with Skia content and
> OMTC basic)
>  - If you use Cairo content instead of Skia content, it works (With Linux
> and OMTC basic)
>  - If you use old main-thread basic layers instead of OMTC basic layers, it
> works (on Linux with Skia content).
> 
> The xrender preference does not make a difference.

Benoit, I guess this was using GTK3 builds, right ?

While working on Xlib surface removal for OMTC basic under GTK3, I got the exact same trouble and tracked this issue down to nsWindow::GetThebesSurface() not being implemented for GTK3 path (So BasicCompositor was not getting any surface from nsWindow::StartRemoteDrawing())

This was subsequently fixed by Bug 1013552

(I don't exactly know why this worked with 'cairo' backend and not 'skia' tho).
So it would be worth it to try to reproduce this bug again.
(In reply to Frederic Plourde (:fred23) from comment #3)
> (In reply to Benoit Jacob [:bjacob] from comment #0)
> > It works fine if you change any of these 3 factors:
> >  - If you try on Windows instead of Linux, it works (with Skia content and
> > OMTC basic)
> >  - If you use Cairo content instead of Skia content, it works (With Linux
> > and OMTC basic)
> >  - If you use old main-thread basic layers instead of OMTC basic layers, it
> > works (on Linux with Skia content).
> > 
> > The xrender preference does not make a difference.
> 
> Benoit, I guess this was using GTK3 builds, right ?

This was using whatever was the default when I wrote this comment. Was GTK3 already the default? I certainly didn't do anything specifically to opt in to GTK3.
Ah, I don't think GTK3 was the default at this time either.
So there's something weird here...

Ok, let's keep that open, as I'll be having the required setup/build to test that very shortly.
So stay tuned for more news on that front.

thanks.
No, this is on GTK2 builds. You can reproduce it by setting the prefs in comment 1 in nightly
When I upgraded to Developer Preview 40.0a2 on Linux w/ Fedora 21 it started with blank windows like this bug suggests. Both Beta and nightly worked fine. I tried changing various combinations of: 

layers.acceleration.disabled = true/false
layers.offmainthreadcomposition.enabled = true/false
layers.offmainthreadcomposition.force-basic = true/false

Every time FF DP restarted it showed blank windows. Going to about:support showed that I had a non-default setting for: gfx.xrender.enabled set to false. Changing to true and restarting fixed it. Was my issue related or unrelated to this bug?
Firefox 40 run on GNU/Linux renders a blank window with skia content backend.
I'm confirming this bug. After upgrade from Firefox 39 to 40 on Linux Mint, it renders a blank window (see attached screenshot).

I had default settings ("true") for "gfx.renderer.enabled" and "layers.offmainthreadcomposition.enabled", and modified "gfx.content.azure.backends" set to "skia,cairo" (see attached about:support info).

After changing the content backend to cairo, the Firefox window is render correctly.
Attached file about:support info
With GTK3 enabled in Firefox 46, Skia, OMTC and full acceleration work fine for me using these settings in about:config

layers.acceleration.force-enabled = true
gfx.canvas.azure.backends = skia
gfx.content.azure.backends = skia
gfx.canvas.azure.accelerated = true

about:support shows:

GPU Accelerated Windows: 2/2 OpenGL (OMTC)
AzureCanvasBackend: skia
AzureContentBackend: skia
AzureSkiaAccelerated: 1

OS: current Debian testing x86_64 / KDE Plasma 5. GPU: Nvidia GTX 680, closed driver 361.42.
(In reply to Pawel Widera from comment #9)
> I'm confirming this bug. After upgrade from Firefox 39 to 40 on Linux Mint,
> it renders a blank window (see attached screenshot).
> 
> I had default settings ("true") for "gfx.renderer.enabled" and
> "layers.offmainthreadcomposition.enabled", and modified
> "gfx.content.azure.backends" set to "skia,cairo" (see attached about:support
> info).
> 
> After changing the content backend to cairo, the Firefox window is render
> correctly.

Do you also see it on nightly?
Is this still a problem?
Flags: needinfo?(momat)
Flags: needinfo?(jacob.benoit.1)
Flags: needinfo?(jacob.benoit.1)
I'm not sure how to test it in 48+. The config options have changed and
"layers.offmainthreadcomposition.enabled" is no longer there. How can I
enable the OMTC and acceleration?

I've tried Shmerl's settings (in comment 11)  but these do not enable
canvas acceleration. I end up with the following in about:support:
- AzureCanvasAccelerated: 0
- AzureCanvasBackend: skia
- AzureContentBackend: skia
- AzureFallbackCanvasBackend: none
- CairoUseXRender: 1
Flags: needinfo?(momat) → needinfo?(mchang)
(In reply to Pawel Widera from comment #14)
> I'm not sure how to test it in 48+. The config options have changed and
> "layers.offmainthreadcomposition.enabled" is no longer there. How can I
> enable the OMTC and acceleration?
> 
> I've tried Shmerl's settings (in comment 11)  but these do not enable
> canvas acceleration. I end up with the following in about:support:
> - AzureCanvasAccelerated: 0
> - AzureCanvasBackend: skia
> - AzureContentBackend: skia
> - AzureFallbackCanvasBackend: none
> - CairoUseXRender: 1

I don't think we have hardware acceleration on linux, but I'm not quite sure.

To check if acceleration is enabled, check the preference "layers.acceleration.disabled" is not set to true. Can you please also attach your whole about:support here please?
Flags: needinfo?(mchang) → needinfo?(momat)
Resolving as WFM. Please re-open if this is still an issue. By default, we should have OMTC with basic layers on linux with 48.
Status: NEW → RESOLVED
Closed: 8 years ago
Flags: needinfo?(momat)
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: