зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1684194 [Linux] Use RenderCompositorEGL on X11/EGL, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D108508
This commit is contained in:
Родитель
8b8afdb266
Коммит
97fe4dc9a5
|
@ -255,7 +255,7 @@ already_AddRefed<GLContext> GLContextEGLFactory::CreateImpl(
|
|||
int visualID = 0;
|
||||
#ifdef MOZ_X11
|
||||
GdkDisplay* gdkDisplay = gdk_display_get_default();
|
||||
if (GdkIsX11Display(gdkDisplay)) {
|
||||
if (GdkIsX11Display(gdkDisplay) && aWindow) {
|
||||
auto* display = GDK_DISPLAY_XDISPLAY(gdkDisplay);
|
||||
if (display) {
|
||||
XWindowAttributes windowAttrs;
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace mozilla::wr {
|
|||
UniquePtr<RenderCompositor> RenderCompositorEGL::Create(
|
||||
RefPtr<widget::CompositorWidget> aWidget, nsACString& aError) {
|
||||
#ifdef MOZ_WAYLAND
|
||||
if (!mozilla::widget::GdkIsWaylandDisplay()) {
|
||||
if (!gfx::gfxVars::UseEGL()) {
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1125,7 +1125,7 @@ static already_AddRefed<gl::GLContext> CreateGLContext(nsACString& aError) {
|
|||
#elif defined(MOZ_WIDGET_ANDROID)
|
||||
gl = CreateGLContextEGL();
|
||||
#elif defined(MOZ_WAYLAND)
|
||||
if (mozilla::widget::GdkIsWaylandDisplay()) {
|
||||
if (gfx::gfxVars::UseEGL()) {
|
||||
gl = CreateGLContextEGL();
|
||||
}
|
||||
#elif XP_MACOSX
|
||||
|
|
|
@ -4861,6 +4861,14 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
|||
// the drawing window
|
||||
mGdkWindow = gtk_widget_get_window(eventWidget);
|
||||
|
||||
#ifdef MOZ_WAYLAND
|
||||
if (mIsX11Display && gfx::gfxVars::UseEGL() && isAccelerated) {
|
||||
mCompositorInitiallyPaused = true;
|
||||
mNeedsCompositorResume = true;
|
||||
MaybeResumeCompositor();
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mWindowType == eWindowType_popup) {
|
||||
// gdk does not automatically set the cursor for "temporary"
|
||||
// windows, which are what gtk uses for popups.
|
||||
|
|
Загрузка…
Ссылка в новой задаче