зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1710958 [Linux] Delay DMABuf initialization when it's really needed, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D115480
This commit is contained in:
Родитель
fe7a7995ba
Коммит
42c1875739
|
@ -115,13 +115,12 @@ gfxPlatformGtk::gfxPlatformGtk() {
|
|||
}
|
||||
}
|
||||
|
||||
InitBackendPrefs(GetBackendPrefs());
|
||||
|
||||
#ifdef MOZ_WAYLAND
|
||||
mUseWebGLDmabufBackend =
|
||||
gfxVars::UseDMABuf() && GetDMABufDevice()->IsDMABufWebGLEnabled();
|
||||
mUseWebGLDmabufBackend = true;
|
||||
#endif
|
||||
|
||||
InitBackendPrefs(GetBackendPrefs());
|
||||
|
||||
gPlatformFTLibrary = Factory::NewFTLibrary();
|
||||
MOZ_RELEASE_ASSERT(gPlatformFTLibrary);
|
||||
Factory::SetFTLibrary(gPlatformFTLibrary);
|
||||
|
@ -460,6 +459,15 @@ uint32_t gfxPlatformGtk::MaxGenericSubstitions() {
|
|||
|
||||
bool gfxPlatformGtk::AccelerateLayersByDefault() { return true; }
|
||||
|
||||
#ifdef MOZ_WAYLAND
|
||||
bool gfxPlatformGtk::UseDMABufWebGL() {
|
||||
static bool dmabufAvailable = []() {
|
||||
return gfxVars::UseDMABuf() && GetDMABufDevice()->IsDMABufWebGLEnabled();
|
||||
}();
|
||||
return dmabufAvailable && mUseWebGLDmabufBackend;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MOZ_X11)
|
||||
|
||||
static nsTArray<uint8_t> GetDisplayICCProfile(Display* dpy, Window& root) {
|
||||
|
|
|
@ -75,7 +75,7 @@ class gfxPlatformGtk final : public gfxPlatform {
|
|||
#endif
|
||||
|
||||
#ifdef MOZ_WAYLAND
|
||||
bool UseDMABufWebGL() override { return mUseWebGLDmabufBackend; }
|
||||
bool UseDMABufWebGL() override;
|
||||
void DisableDMABufWebGL() { mUseWebGLDmabufBackend = false; }
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче