зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1557658 - [Wayland] Don't use developers version of libdrm.so and libgbm.so, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D34146 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
9d2ac6e4b3
Коммит
7c09d4b7af
|
@ -10,6 +10,9 @@
|
|||
namespace mozilla {
|
||||
namespace widget {
|
||||
|
||||
#define GBMLIB_NAME "libgbm.so.1"
|
||||
#define DRMLIB_NAME "libdrm.so.2"
|
||||
|
||||
// nsWaylandDisplay needs to be created for each calling thread(main thread,
|
||||
// compositor thread and render thread)
|
||||
#define MAX_DISPLAY_CONNECTIONS 3
|
||||
|
@ -366,8 +369,11 @@ bool nsGbmLib::Load() {
|
|||
if (!sGbmLibHandle && !sLibLoaded) {
|
||||
sLibLoaded = true;
|
||||
|
||||
sGbmLibHandle = dlopen("libgbm.so", RTLD_LAZY | RTLD_LOCAL);
|
||||
sGbmLibHandle = dlopen(GBMLIB_NAME, RTLD_LAZY | RTLD_LOCAL);
|
||||
if (!sGbmLibHandle) {
|
||||
NS_WARNING(nsPrintfCString("Failed to load %s, dmabuf isn't available.\n",
|
||||
GBMLIB_NAME)
|
||||
.get());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -389,10 +395,16 @@ bool nsGbmLib::Load() {
|
|||
sGbmLibHandle, "gbm_bo_get_stride_for_plane");
|
||||
sGetOffset = (GetOffsetFunc)dlsym(sGbmLibHandle, "gbm_bo_get_offset");
|
||||
|
||||
sXf86DrmLibHandle = dlopen("libdrm.so", RTLD_LAZY | RTLD_LOCAL);
|
||||
sXf86DrmLibHandle = dlopen(DRMLIB_NAME, RTLD_LAZY | RTLD_LOCAL);
|
||||
if (sXf86DrmLibHandle) {
|
||||
sDrmPrimeHandleToFD = (DrmPrimeHandleToFDFunc)dlsym(sXf86DrmLibHandle,
|
||||
"drmPrimeHandleToFD");
|
||||
if (!sDrmPrimeHandleToFD) {
|
||||
NS_WARNING(nsPrintfCString(
|
||||
"Failed to load %s, gbm modifiers are not available.\n",
|
||||
DRMLIB_NAME)
|
||||
.get());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче