зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1699864 - Request 32bit color depth on Linux/EGL by default, r=stransky,jgilbert
Since D108508 the X11/EGL backend creates a shared GL context via `CreateGLContextEGL()` which chains up to `CreateForCompositorWidget()` with a `nullptr` widget. With the OGL compositor we relied on the widget giving us a valid color depth, while now we'd fall back to `gfxVars::ScreenDepth()`. On X11 color depth is defined as: > depth means the number of bits in a pixel that are actually used > to determine the pixel color i.e. we on a usual system we would get 24bit. As we require an alpha channel when using WR, the result would be disappointing. Thus hardcode 32bit color depth for X11/EGL when creating contexts without widget for now. In order to keep X11 and Wayland code close together, do the same on Wayland, even if `gfxVars::ScreenDepth()` returns valid values there. Differential Revision: https://phabricator.services.mozilla.com/D109737
This commit is contained in:
Родитель
b696e62540
Коммит
1dcdf4e04c
|
@ -1007,6 +1007,10 @@ already_AddRefed<GLContext> GLContextProviderEGL::CreateForCompositorWidget(
|
|||
window = GET_NATIVE_WINDOW_FROM_COMPOSITOR_WIDGET(aCompositorWidget);
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
depth = aCompositorWidget->AsX11()->GetDepth();
|
||||
#endif
|
||||
} else {
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
depth = 32;
|
||||
#endif
|
||||
}
|
||||
return GLContextEGLFactory::Create(window, aWebRender, depth);
|
||||
|
|
Загрузка…
Ссылка в новой задаче