MFH: r501604 r501832
www/firefox: update to 67.0 Changes: https://www.mozilla.org/firefox/67.0/releasenotes/ PR: 236651 Security: 44b6dfbf-4ef7-4d52-ad52-2b1b05d81272 Approved by: ports-secteam (miwi) Differential Revision: https://reviews.freebsd.org/D19654
This commit is contained in:
parent
6718932582
commit
357ee1e984
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/branches/2019Q2/; revision=501858
@ -360,7 +360,7 @@ MOZ_OPTIONS+= --enable-debug --disable-release
|
||||
STRIP= # ports/184285
|
||||
.else
|
||||
MOZ_OPTIONS+= --disable-debug --disable-debug-symbols --enable-release
|
||||
. if ${MOZILLA_VER:R:R} >= 67 && (${ARCH:Maarch64} || ${MACHINE_CPU:Msse2})
|
||||
. if ${MOZILLA_VER:R:R} >= 68 && (${ARCH:Maarch64} || ${MACHINE_CPU:Msse2})
|
||||
MOZ_OPTIONS+= --enable-rust-simd
|
||||
. endif
|
||||
.endif
|
||||
|
@ -2,18 +2,19 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= firefox
|
||||
DISTVERSION= 66.0.5
|
||||
DISTVERSION= 67.0
|
||||
PORTREVISION= 2
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= www ipv6
|
||||
MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source \
|
||||
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build1/source
|
||||
MOZILLA/${PORTNAME}/candidates/${DISTVERSION}-candidates/build2/source
|
||||
DISTFILES= ${DISTNAME}.source${EXTRACT_SUFX}
|
||||
|
||||
MAINTAINER= gecko@FreeBSD.org
|
||||
COMMENT= Web browser based on the browser portion of Mozilla
|
||||
|
||||
BUILD_DEPENDS= nspr>=4.19:devel/nspr \
|
||||
nss>=3.42:security/nss \
|
||||
BUILD_DEPENDS= nspr>=4.21:devel/nspr \
|
||||
nss>=3.43:security/nss \
|
||||
icu>=59.1,1:devel/icu \
|
||||
libevent>=2.1.8:devel/libevent \
|
||||
harfbuzz>=2.3.1:print/harfbuzz \
|
||||
@ -21,11 +22,11 @@ BUILD_DEPENDS= nspr>=4.19:devel/nspr \
|
||||
png>=1.6.35:graphics/png \
|
||||
libvorbis>=1.3.6,3:audio/libvorbis \
|
||||
libvpx>=1.5.0:multimedia/libvpx \
|
||||
sqlite3>=3.26:databases/sqlite3 \
|
||||
sqlite3>=3.27.2:databases/sqlite3 \
|
||||
${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3@${PY_FLAVOR} \
|
||||
v4l_compat>0:multimedia/v4l_compat \
|
||||
autoconf-2.13:devel/autoconf213 \
|
||||
yasm:devel/yasm \
|
||||
nasm:devel/nasm \
|
||||
zip:archivers/zip
|
||||
|
||||
USE_GECKO= gecko
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1557261981
|
||||
SHA256 (firefox-66.0.5.source.tar.xz) = a2aeb4e036d1365a2d2550e24ba8b4dde061281300f2b11a204cc1e9eb1792b5
|
||||
SIZE (firefox-66.0.5.source.tar.xz) = 282561836
|
||||
TIMESTAMP = 1558053331
|
||||
SHA256 (firefox-67.0.source.tar.xz) = 2cb937db00e35162393aa5b65d1f2280be1e62d5ee33d3e9997cccba542d791b
|
||||
SIZE (firefox-67.0.source.tar.xz) = 282874008
|
||||
|
@ -1,59 +0,0 @@
|
||||
commit 7b5468921fef
|
||||
Author: Mike Hommey <mh+mozilla@glandium.org>
|
||||
Date: Tue Mar 12 14:14:43 2019 +0000
|
||||
|
||||
Bug 1513605 - Add PIC flags when running the clock_gettime(CLOCK_MONOTONIC) check. r=dmajor
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D23091
|
||||
|
||||
--HG--
|
||||
extra : moz-landing-system : lando
|
||||
---
|
||||
js/src/old-configure.in | 3 +++
|
||||
old-configure.in | 3 +++
|
||||
2 files changed, 6 insertions(+)
|
||||
|
||||
diff --git js/src/old-configure.in js/src/old-configure.in
|
||||
index 64654df2230b..ce4458098a6c 100644
|
||||
--- js/src/old-configure.in
|
||||
+++ js/src/old-configure.in
|
||||
@@ -1015,7 +1015,9 @@ Darwin)
|
||||
ac_cv_clock_monotonic,
|
||||
[for libs in "" -lrt; do
|
||||
_SAVE_LIBS="$LIBS"
|
||||
+ _SAVE_CFLAGS="$CFLAGS"
|
||||
LIBS="$LIBS $libs"
|
||||
+ CFLAGS="$CFLAGS $DSO_PIC_CFLAGS"
|
||||
AC_TRY_LINK([#include <time.h>],
|
||||
[ struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts); ],
|
||||
@@ -1024,6 +1026,7 @@ Darwin)
|
||||
break,
|
||||
ac_cv_clock_monotonic=no)
|
||||
LIBS="$_SAVE_LIBS"
|
||||
+ CFLAGS="$_SAVE_CFLAGS"
|
||||
done])
|
||||
if test "$ac_cv_clock_monotonic" != "no"; then
|
||||
HAVE_CLOCK_MONOTONIC=1
|
||||
diff --git old-configure.in old-configure.in
|
||||
index d6a587d54b3b..1ed22938205e 100644
|
||||
--- old-configure.in
|
||||
+++ old-configure.in
|
||||
@@ -1303,7 +1303,9 @@ Darwin)
|
||||
ac_cv_clock_monotonic,
|
||||
[for libs in "" -lrt; do
|
||||
_SAVE_LIBS="$LIBS"
|
||||
+ _SAVE_CFLAGS="$CFLAGS"
|
||||
LIBS="$LIBS $libs"
|
||||
+ CFLAGS="$CFLAGS $DSO_PIC_CFLAGS"
|
||||
AC_TRY_LINK([#include <time.h>],
|
||||
[ struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts); ],
|
||||
@@ -1312,6 +1314,7 @@ Darwin)
|
||||
break,
|
||||
ac_cv_clock_monotonic=no)
|
||||
LIBS="$_SAVE_LIBS"
|
||||
+ CFLAGS="$_SAVE_CFLAGS"
|
||||
done])
|
||||
if test "$ac_cv_clock_monotonic" != "no"; then
|
||||
HAVE_CLOCK_MONOTONIC=1
|
@ -1,590 +0,0 @@
|
||||
commit 94f519f31849
|
||||
Author: sotaro <sotaro.ikeda.g@gmail.com>
|
||||
Date: Tue Feb 12 16:32:51 2019 +0900
|
||||
|
||||
Bug 1514156 - Add GLContextEGL::CreateEGLSurfaceForCompositorWidget() for Wayland r=jgilbert
|
||||
|
||||
When GDK_BACKEND is wayland, widget is not fully mapped during creating CompositorSession. During CompositorSession creation, GLContextProviderEGL::CreateForCompositorWidget() creates GLContextEGL, but we could not create valid EGLSurface. We could create valid EGLSurface when widget is fully mapped. CreateEGLSurfaceForCompositorWidget() is used for creating valid EGLSurface after widget is fully mapped.
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D18654
|
||||
---
|
||||
gfx/gl/GLContextEGL.h | 4 ++++
|
||||
gfx/gl/GLContextProviderEGL.cpp | 27 +++++++++++++++++++++++++++
|
||||
2 files changed, 31 insertions(+)
|
||||
|
||||
diff --git gfx/gl/GLContextEGL.h gfx/gl/GLContextEGL.h
|
||||
index 95d5e0c02e23..adb37e59a9f7 100644
|
||||
--- gfx/gl/GLContextEGL.h
|
||||
+++ gfx/gl/GLContextEGL.h
|
||||
@@ -91,6 +91,10 @@ class GLContextEGL : public GLContext {
|
||||
CreateContextFlags flags, const gfx::IntSize& size,
|
||||
const SurfaceCaps& minCaps, nsACString* const out_FailureId);
|
||||
|
||||
+#if defined(MOZ_WAYLAND)
|
||||
+ static EGLSurface CreateEGLSurfaceForCompositorWidget(
|
||||
+ widget::CompositorWidget* aCompositorWidget, bool aForceAccelerated);
|
||||
+#endif
|
||||
protected:
|
||||
friend class GLContextProviderEGL;
|
||||
friend class GLContextEGLFactory;
|
||||
diff --git gfx/gl/GLContextProviderEGL.cpp gfx/gl/GLContextProviderEGL.cpp
|
||||
index 774eb34a8e87..25aa779a7d64 100644
|
||||
--- gfx/gl/GLContextProviderEGL.cpp
|
||||
+++ gfx/gl/GLContextProviderEGL.cpp
|
||||
@@ -295,6 +295,33 @@ already_AddRefed<GLContext> GLContextEGLFactory::Create(
|
||||
return gl.forget();
|
||||
}
|
||||
|
||||
+#if defined(MOZ_WAYLAND)
|
||||
+/* static */ EGLSurface GLContextEGL::CreateEGLSurfaceForCompositorWidget(
|
||||
+ widget::CompositorWidget* aCompositorWidget, bool aForceAccelerated) {
|
||||
+ nsCString discardFailureId;
|
||||
+ if (!GLLibraryEGL::EnsureInitialized(false, &discardFailureId)) {
|
||||
+ gfxCriticalNote << "Failed to load EGL library 6!";
|
||||
+ return EGL_NO_SURFACE;
|
||||
+ }
|
||||
+
|
||||
+ MOZ_ASSERT(aCompositorWidget);
|
||||
+ EGLNativeWindowType window = GET_NATIVE_WINDOW_FROM_COMPOSITOR_WIDGET(aCompositorWidget);
|
||||
+ if (!window) {
|
||||
+ gfxCriticalNote << "window is null";
|
||||
+ return EGL_NO_SURFACE;
|
||||
+ }
|
||||
+ const bool useWebRender = aCompositorWidget->GetCompositorOptions().UseWebRender();
|
||||
+
|
||||
+ EGLConfig config;
|
||||
+ if (!CreateConfig(&config, useWebRender)) {
|
||||
+ gfxCriticalNote << "Failed to create EGLConfig!";
|
||||
+ return EGL_NO_SURFACE;
|
||||
+ }
|
||||
+
|
||||
+ return mozilla::gl::CreateSurfaceFromNativeWindow(window, config);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
GLContextEGL::GLContextEGL(CreateContextFlags flags, const SurfaceCaps& caps,
|
||||
bool isOffscreen, EGLConfig config,
|
||||
EGLSurface surface, EGLContext context)
|
||||
|
||||
commit 0e2cb6d4e88d
|
||||
Author: sotaro <sotaro.ikeda.g@gmail.com>
|
||||
Date: Tue Feb 12 16:33:31 2019 +0900
|
||||
|
||||
Bug 1514156 - Add RenderCompositorEGL for wayland r=nical
|
||||
|
||||
When GDK_BACKEND is wayland, widget is not fully mapped during creating CompositorSession. Needs to create valid EGLSurface after widget is fully mapped.
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D18940
|
||||
---
|
||||
gfx/webrender_bindings/RenderCompositor.cpp | 12 +++
|
||||
gfx/webrender_bindings/RenderCompositorEGL.cpp | 132 +++++++++++++++++++++++++
|
||||
gfx/webrender_bindings/RenderCompositorEGL.h | 54 ++++++++++
|
||||
gfx/webrender_bindings/moz.build | 10 ++
|
||||
widget/gtk/CompositorWidgetChild.cpp | 6 ++
|
||||
widget/gtk/CompositorWidgetChild.h | 4 +-
|
||||
widget/gtk/CompositorWidgetParent.cpp | 8 ++
|
||||
widget/gtk/CompositorWidgetParent.h | 2 +
|
||||
widget/gtk/GtkCompositorWidget.cpp | 12 +++
|
||||
widget/gtk/GtkCompositorWidget.h | 11 +++
|
||||
widget/gtk/PCompositorWidget.ipdl | 1 +
|
||||
widget/gtk/mozcontainer.cpp | 11 +++
|
||||
widget/gtk/mozcontainer.h | 2 +
|
||||
widget/gtk/nsWindow.cpp | 16 +++
|
||||
widget/gtk/nsWindow.h | 1 +
|
||||
15 files changed, 281 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git gfx/webrender_bindings/RenderCompositor.cpp gfx/webrender_bindings/RenderCompositor.cpp
|
||||
index 051482fbabbf..a58268096a89 100644
|
||||
--- gfx/webrender_bindings/RenderCompositor.cpp
|
||||
+++ gfx/webrender_bindings/RenderCompositor.cpp
|
||||
@@ -16,6 +16,10 @@
|
||||
# include "mozilla/webrender/RenderCompositorANGLE.h"
|
||||
#endif
|
||||
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+#include "mozilla/webrender/RenderCompositorEGL.h"
|
||||
+#endif
|
||||
+
|
||||
namespace mozilla {
|
||||
namespace wr {
|
||||
|
||||
@@ -26,6 +30,14 @@ namespace wr {
|
||||
return RenderCompositorANGLE::Create(std::move(aWidget));
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ UniquePtr<RenderCompositor> eglCompositor = RenderCompositorEGL::Create(aWidget);
|
||||
+ if (eglCompositor) {
|
||||
+ return eglCompositor;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
return RenderCompositorOGL::Create(std::move(aWidget));
|
||||
}
|
||||
|
||||
diff --git gfx/webrender_bindings/RenderCompositorEGL.cpp gfx/webrender_bindings/RenderCompositorEGL.cpp
|
||||
new file mode 100644
|
||||
index 000000000000..16245f59afbd
|
||||
--- /dev/null
|
||||
+++ gfx/webrender_bindings/RenderCompositorEGL.cpp
|
||||
@@ -0,0 +1,132 @@
|
||||
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
+
|
||||
+#include "RenderCompositorEGL.h"
|
||||
+
|
||||
+#include "GLContext.h"
|
||||
+#include "GLContextEGL.h"
|
||||
+#include "GLContextProvider.h"
|
||||
+#include "GLLibraryEGL.h"
|
||||
+#include "mozilla/widget/CompositorWidget.h"
|
||||
+#include "mozilla/widget/GtkCompositorWidget.h"
|
||||
+
|
||||
+#include <gdk/gdk.h>
|
||||
+#include <gdk/gdkx.h>
|
||||
+
|
||||
+namespace mozilla {
|
||||
+namespace wr {
|
||||
+
|
||||
+/* static */ UniquePtr<RenderCompositor> RenderCompositorEGL::Create(
|
||||
+ RefPtr<widget::CompositorWidget> aWidget) {
|
||||
+
|
||||
+ if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
+ RefPtr<gl::GLContext> gl;
|
||||
+ gl = CreateGLContext(aWidget);
|
||||
+ if (!gl) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ return MakeUnique<RenderCompositorEGL>(gl, aWidget);
|
||||
+}
|
||||
+
|
||||
+/* static */ already_AddRefed<gl::GLContext>
|
||||
+RenderCompositorEGL::CreateGLContext(RefPtr<widget::CompositorWidget> aWidget) {
|
||||
+ nsCString discardFailureId;
|
||||
+
|
||||
+ // Create GLContext with dummy EGLSurface.
|
||||
+ RefPtr<gl::GLContext> gl =
|
||||
+ //XXX headless context did not work.
|
||||
+ gl::GLContextProviderEGL::CreateForCompositorWidget(aWidget, true);
|
||||
+ if (!gl) {
|
||||
+ gfxCriticalNote << "Failed GL context creation for WebRender: "
|
||||
+ << gfx::hexa(gl.get());
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
+ if (!gl->MakeCurrent()) {
|
||||
+ gfxCriticalNote << "Failed GL context creation for WebRender: "
|
||||
+ << gfx::hexa(gl.get());
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
+ return gl.forget();
|
||||
+}
|
||||
+
|
||||
+/* static */ EGLSurface RenderCompositorEGL::CreateEGLSurface(
|
||||
+ widget::CompositorWidget* aWidget) {
|
||||
+ EGLSurface surface = EGL_NO_SURFACE;
|
||||
+ surface = gl::GLContextEGL::CreateEGLSurfaceForCompositorWidget(
|
||||
+ aWidget, /* aForceAccelerated */ true);
|
||||
+ if (surface == EGL_NO_SURFACE) {
|
||||
+ gfxCriticalNote << "Failed to create EGLSurface";
|
||||
+ }
|
||||
+ return surface;
|
||||
+}
|
||||
+
|
||||
+RenderCompositorEGL::RenderCompositorEGL(
|
||||
+ RefPtr<gl::GLContext> aGL, RefPtr<widget::CompositorWidget> aWidget)
|
||||
+ : RenderCompositor(std::move(aWidget)), mGL(aGL), mEGLSurface(EGL_NO_SURFACE) {
|
||||
+ MOZ_ASSERT(mGL);
|
||||
+}
|
||||
+
|
||||
+RenderCompositorEGL::~RenderCompositorEGL() {
|
||||
+ DestroyEGLSurface();
|
||||
+}
|
||||
+
|
||||
+bool RenderCompositorEGL::BeginFrame() {
|
||||
+
|
||||
+ if (mWidget->AsX11() && mWidget->AsX11()->WaylandRequestsUpdatingEGLSurface()) {
|
||||
+ mEGLSurface = CreateEGLSurface(mWidget);
|
||||
+ gl::GLContextEGL::Cast(gl())->SetEGLSurfaceOverride(mEGLSurface);
|
||||
+ }
|
||||
+
|
||||
+ if (!mGL->MakeCurrent()) {
|
||||
+ gfxCriticalNote << "Failed to make render context current, can't draw.";
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+void RenderCompositorEGL::EndFrame()
|
||||
+{
|
||||
+ if (mEGLSurface != EGL_NO_SURFACE) {
|
||||
+ mGL->SwapBuffers();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void RenderCompositorEGL::WaitForGPU() {}
|
||||
+
|
||||
+void RenderCompositorEGL::Pause() {}
|
||||
+
|
||||
+bool RenderCompositorEGL::Resume() {
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
+bool RenderCompositorEGL::MakeCurrent() {
|
||||
+ gl::GLContextEGL::Cast(gl())->SetEGLSurfaceOverride(mEGLSurface);
|
||||
+ return gl()->MakeCurrent();
|
||||
+}
|
||||
+
|
||||
+void RenderCompositorEGL::DestroyEGLSurface() {
|
||||
+ auto* egl = gl::GLLibraryEGL::Get();
|
||||
+
|
||||
+ // Release EGLSurface of back buffer before calling ResizeBuffers().
|
||||
+ if (mEGLSurface) {
|
||||
+ gl::GLContextEGL::Cast(gl())->SetEGLSurfaceOverride(EGL_NO_SURFACE);
|
||||
+ egl->fDestroySurface(egl->Display(), mEGLSurface);
|
||||
+ mEGLSurface = nullptr;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+LayoutDeviceIntSize RenderCompositorEGL::GetBufferSize() {
|
||||
+ return mWidget->GetClientSize();
|
||||
+}
|
||||
+
|
||||
+} // namespace wr
|
||||
+} // namespace mozilla
|
||||
diff --git gfx/webrender_bindings/RenderCompositorEGL.h gfx/webrender_bindings/RenderCompositorEGL.h
|
||||
new file mode 100644
|
||||
index 000000000000..f12e16d974af
|
||||
--- /dev/null
|
||||
+++ gfx/webrender_bindings/RenderCompositorEGL.h
|
||||
@@ -0,0 +1,54 @@
|
||||
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
+/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
+/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
+
|
||||
+#ifndef MOZILLA_GFX_RENDERCOMPOSITOR_EGL_H
|
||||
+#define MOZILLA_GFX_RENDERCOMPOSITOR_EGL_H
|
||||
+
|
||||
+#include "GLTypes.h"
|
||||
+#include "mozilla/webrender/RenderCompositor.h"
|
||||
+
|
||||
+namespace mozilla {
|
||||
+
|
||||
+namespace wr {
|
||||
+
|
||||
+class RenderCompositorEGL : public RenderCompositor {
|
||||
+ public:
|
||||
+ static UniquePtr<RenderCompositor> Create(
|
||||
+ RefPtr<widget::CompositorWidget> aWidget);
|
||||
+
|
||||
+ RenderCompositorEGL(RefPtr<gl::GLContext> aGL,
|
||||
+ RefPtr<widget::CompositorWidget> aWidget);
|
||||
+ virtual ~RenderCompositorEGL();
|
||||
+
|
||||
+ bool BeginFrame() override;
|
||||
+ void EndFrame() override;
|
||||
+ void WaitForGPU() override;
|
||||
+ void Pause() override;
|
||||
+ bool Resume() override;
|
||||
+
|
||||
+ gl::GLContext* gl() const override { return mGL; }
|
||||
+
|
||||
+ bool MakeCurrent() override;
|
||||
+
|
||||
+ bool UseANGLE() const override { return false; }
|
||||
+
|
||||
+ LayoutDeviceIntSize GetBufferSize() override;
|
||||
+
|
||||
+ protected:
|
||||
+ static already_AddRefed<gl::GLContext> CreateGLContext(
|
||||
+ RefPtr<widget::CompositorWidget> aWidget);
|
||||
+ static EGLSurface CreateEGLSurface(widget::CompositorWidget* aWidget);
|
||||
+
|
||||
+ void DestroyEGLSurface();
|
||||
+
|
||||
+ const RefPtr<gl::GLContext> mGL;
|
||||
+ EGLSurface mEGLSurface;
|
||||
+};
|
||||
+
|
||||
+} // namespace wr
|
||||
+} // namespace mozilla
|
||||
+
|
||||
+#endif // MOZILLA_GFX_RENDERCOMPOSITOR_EGL_H
|
||||
diff --git gfx/webrender_bindings/moz.build gfx/webrender_bindings/moz.build
|
||||
index 4acdfbb817d3..f632bc5d24d9 100644
|
||||
--- gfx/webrender_bindings/moz.build
|
||||
+++ gfx/webrender_bindings/moz.build
|
||||
@@ -67,6 +67,14 @@ if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
|
||||
'RenderCompositorANGLE.cpp',
|
||||
]
|
||||
|
||||
+if CONFIG['MOZ_WAYLAND']:
|
||||
+ EXPORTS.mozilla.webrender += [
|
||||
+ 'RenderCompositorEGL.h',
|
||||
+ ]
|
||||
+ SOURCES += [
|
||||
+ 'RenderCompositorEGL.cpp',
|
||||
+ ]
|
||||
+
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk3'):
|
||||
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
|
||||
CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
|
||||
@@ -75,5 +83,7 @@ include('/ipc/chromium/chromium-config.mozbuild')
|
||||
|
||||
FINAL_LIBRARY = 'xul'
|
||||
|
||||
+CXXFLAGS += CONFIG['TK_CFLAGS']
|
||||
+
|
||||
if CONFIG['CC_TYPE'] == 'clang-cl':
|
||||
AllowCompilerWarnings() # workaround for bug 1090497
|
||||
diff --git widget/gtk/CompositorWidgetChild.cpp widget/gtk/CompositorWidgetChild.cpp
|
||||
index b746fec0a283..07847a298707 100644
|
||||
--- widget/gtk/CompositorWidgetChild.cpp
|
||||
+++ widget/gtk/CompositorWidgetChild.cpp
|
||||
@@ -35,5 +35,11 @@ void CompositorWidgetChild::NotifyClientSizeChanged(
|
||||
Unused << SendNotifyClientSizeChanged(aClientSize);
|
||||
}
|
||||
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+void CompositorWidgetChild::RequestsUpdatingEGLSurface() {
|
||||
+ Unused << SendRequestsUpdatingEGLSurface();
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
} // namespace widget
|
||||
} // namespace mozilla
|
||||
diff --git widget/gtk/CompositorWidgetChild.h widget/gtk/CompositorWidgetChild.h
|
||||
index fe3285eb6f22..0167dbb051c6 100644
|
||||
--- widget/gtk/CompositorWidgetChild.h
|
||||
+++ widget/gtk/CompositorWidgetChild.h
|
||||
@@ -24,7 +24,9 @@ class CompositorWidgetChild final : public PCompositorWidgetChild,
|
||||
mozilla::ipc::IPCResult RecvUnobserveVsync() override;
|
||||
|
||||
void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override;
|
||||
-
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ void RequestsUpdatingEGLSurface() override;
|
||||
+#endif
|
||||
private:
|
||||
RefPtr<CompositorVsyncDispatcher> mVsyncDispatcher;
|
||||
RefPtr<CompositorWidgetVsyncObserver> mVsyncObserver;
|
||||
diff --git widget/gtk/CompositorWidgetParent.cpp widget/gtk/CompositorWidgetParent.cpp
|
||||
index ae49ec9174bc..b4031883d3a8 100644
|
||||
--- widget/gtk/CompositorWidgetParent.cpp
|
||||
+++ widget/gtk/CompositorWidgetParent.cpp
|
||||
@@ -40,5 +40,13 @@ mozilla::ipc::IPCResult CompositorWidgetParent::RecvNotifyClientSizeChanged(
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
+mozilla::ipc::IPCResult CompositorWidgetParent::RecvRequestsUpdatingEGLSurface()
|
||||
+{
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ RequestsUpdatingEGLSurface();
|
||||
+#endif
|
||||
+ return IPC_OK();
|
||||
+}
|
||||
+
|
||||
} // namespace widget
|
||||
} // namespace mozilla
|
||||
diff --git widget/gtk/CompositorWidgetParent.h widget/gtk/CompositorWidgetParent.h
|
||||
index 5d0ccfcf50f2..8ddd58a8964f 100644
|
||||
--- widget/gtk/CompositorWidgetParent.h
|
||||
+++ widget/gtk/CompositorWidgetParent.h
|
||||
@@ -27,6 +27,8 @@ class CompositorWidgetParent final : public PCompositorWidgetParent,
|
||||
mozilla::ipc::IPCResult RecvNotifyClientSizeChanged(
|
||||
const LayoutDeviceIntSize& aClientSize) override;
|
||||
|
||||
+ mozilla::ipc::IPCResult RecvRequestsUpdatingEGLSurface() override;
|
||||
+
|
||||
private:
|
||||
RefPtr<VsyncObserver> mVsyncObserver;
|
||||
};
|
||||
diff --git widget/gtk/GtkCompositorWidget.cpp widget/gtk/GtkCompositorWidget.cpp
|
||||
index bc21d6c4d05e..f787e8c23797 100644
|
||||
--- widget/gtk/GtkCompositorWidget.cpp
|
||||
+++ widget/gtk/GtkCompositorWidget.cpp
|
||||
@@ -85,6 +85,18 @@ void GtkCompositorWidget::NotifyClientSizeChanged(
|
||||
mClientSize = aClientSize;
|
||||
}
|
||||
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+void GtkCompositorWidget::RequestsUpdatingEGLSurface() {
|
||||
+ mWaylandRequestsUpdatingEGLSurface = true;
|
||||
+}
|
||||
+
|
||||
+bool GtkCompositorWidget::WaylandRequestsUpdatingEGLSurface() {
|
||||
+ bool ret = mWaylandRequestsUpdatingEGLSurface;
|
||||
+ mWaylandRequestsUpdatingEGLSurface = false;
|
||||
+ return ret;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
LayoutDeviceIntSize GtkCompositorWidget::GetClientSize() { return mClientSize; }
|
||||
|
||||
uintptr_t GtkCompositorWidget::GetWidgetKey() {
|
||||
diff --git widget/gtk/GtkCompositorWidget.h widget/gtk/GtkCompositorWidget.h
|
||||
index fd0c71426c18..75e156dffb02 100644
|
||||
--- widget/gtk/GtkCompositorWidget.h
|
||||
+++ widget/gtk/GtkCompositorWidget.h
|
||||
@@ -20,6 +20,10 @@ class PlatformCompositorWidgetDelegate : public CompositorWidgetDelegate {
|
||||
virtual void NotifyClientSizeChanged(
|
||||
const LayoutDeviceIntSize& aClientSize) = 0;
|
||||
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ virtual void RequestsUpdatingEGLSurface() = 0;
|
||||
+#endif
|
||||
+
|
||||
// CompositorWidgetDelegate Overrides
|
||||
|
||||
PlatformCompositorWidgetDelegate* AsPlatformSpecificDelegate() override {
|
||||
@@ -62,11 +66,18 @@ class GtkCompositorWidget : public CompositorWidget,
|
||||
|
||||
void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override;
|
||||
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ void RequestsUpdatingEGLSurface() override;
|
||||
+ bool WaylandRequestsUpdatingEGLSurface();
|
||||
+#endif
|
||||
protected:
|
||||
nsWindow* mWidget;
|
||||
|
||||
private:
|
||||
LayoutDeviceIntSize mClientSize;
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ bool mWaylandRequestsUpdatingEGLSurface = false;
|
||||
+#endif
|
||||
|
||||
Display* mXDisplay;
|
||||
Window mXWindow;
|
||||
diff --git widget/gtk/PCompositorWidget.ipdl widget/gtk/PCompositorWidget.ipdl
|
||||
index 178fe78e4dc2..51390e400649 100644
|
||||
--- widget/gtk/PCompositorWidget.ipdl
|
||||
+++ widget/gtk/PCompositorWidget.ipdl
|
||||
@@ -19,6 +19,7 @@ parent:
|
||||
async __delete__();
|
||||
|
||||
async NotifyClientSizeChanged(LayoutDeviceIntSize aClientSize);
|
||||
+ async RequestsUpdatingEGLSurface();
|
||||
|
||||
child:
|
||||
|
||||
diff --git widget/gtk/mozcontainer.cpp widget/gtk/mozcontainer.cpp
|
||||
index 8be1f133d39f..8461e7b9d470 100644
|
||||
--- widget/gtk/mozcontainer.cpp
|
||||
+++ widget/gtk/mozcontainer.cpp
|
||||
@@ -159,6 +159,7 @@ void moz_container_init(MozContainer *container) {
|
||||
// We can draw to x11 window any time.
|
||||
container->ready_to_draw = GDK_IS_X11_DISPLAY(gdk_display_get_default());
|
||||
container->surface_needs_clear = true;
|
||||
+ container->egl_surface_needs_update = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -176,6 +177,9 @@ static void frame_callback_handler(void *data, struct wl_callback *callback,
|
||||
uint32_t time) {
|
||||
MozContainer *container = MOZ_CONTAINER(data);
|
||||
g_clear_pointer(&container->frame_callback_handler, wl_callback_destroy);
|
||||
+ if (!container->ready_to_draw) {
|
||||
+ container->egl_surface_needs_update = true;
|
||||
+ }
|
||||
container->ready_to_draw = true;
|
||||
}
|
||||
|
||||
@@ -208,6 +212,7 @@ static void moz_container_unmap_wayland(MozContainer *container) {
|
||||
g_clear_pointer(&container->frame_callback_handler, wl_callback_destroy);
|
||||
|
||||
container->surface_needs_clear = true;
|
||||
+ container->egl_surface_needs_update = false;
|
||||
container->ready_to_draw = false;
|
||||
}
|
||||
|
||||
@@ -555,6 +560,12 @@ gboolean moz_container_surface_needs_clear(MozContainer *container) {
|
||||
container->surface_needs_clear = false;
|
||||
return state;
|
||||
}
|
||||
+
|
||||
+gboolean moz_container_egl_surface_needs_update(MozContainer *container){
|
||||
+ gboolean state = container->egl_surface_needs_update;
|
||||
+ container->egl_surface_needs_update = false;
|
||||
+ return state;
|
||||
+}
|
||||
#endif
|
||||
|
||||
void moz_container_force_default_visual(MozContainer *container) {
|
||||
diff --git widget/gtk/mozcontainer.h widget/gtk/mozcontainer.h
|
||||
index e9c218c1bc3e..1ed6f439805d 100644
|
||||
--- widget/gtk/mozcontainer.h
|
||||
+++ widget/gtk/mozcontainer.h
|
||||
@@ -77,6 +77,7 @@ struct _MozContainer {
|
||||
struct wl_egl_window *eglwindow;
|
||||
struct wl_callback *frame_callback_handler;
|
||||
gboolean surface_needs_clear;
|
||||
+ gboolean egl_surface_needs_update;
|
||||
gboolean ready_to_draw;
|
||||
#endif
|
||||
gboolean force_default_visual;
|
||||
@@ -100,6 +101,7 @@ gboolean moz_container_has_wl_egl_window(MozContainer *container);
|
||||
gboolean moz_container_surface_needs_clear(MozContainer *container);
|
||||
void moz_container_scale_changed(MozContainer *container,
|
||||
GtkAllocation *aAllocation);
|
||||
+gboolean moz_container_egl_surface_needs_update(MozContainer *container);
|
||||
#endif
|
||||
|
||||
#endif /* __MOZ_CONTAINER_H__ */
|
||||
diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp
|
||||
index 50e6354ea374..ceabbf583a42 100644
|
||||
--- widget/gtk/nsWindow.cpp
|
||||
+++ widget/gtk/nsWindow.cpp
|
||||
@@ -1886,6 +1886,11 @@ gboolean nsWindow::OnExposeEvent(cairo_t *cr) {
|
||||
region.ScaleRoundOut(scale, scale);
|
||||
|
||||
if (GetLayerManager()->AsKnowsCompositor() && mCompositorSession) {
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ if(mCompositorWidgetDelegate && WaylandRequestsUpdatingEGLSurface()) {
|
||||
+ mCompositorWidgetDelegate->RequestsUpdatingEGLSurface();
|
||||
+ }
|
||||
+#endif
|
||||
// We need to paint to the screen even if nothing changed, since if we
|
||||
// don't have a compositing window manager, our pixels could be stale.
|
||||
GetLayerManager()->SetNeedsComposite(true);
|
||||
@@ -6599,6 +6604,17 @@ bool nsWindow::WaylandSurfaceNeedsClear() {
|
||||
"nsWindow::WaylandSurfaceNeedsClear(): We don't have any mContainer!");
|
||||
return false;
|
||||
}
|
||||
+
|
||||
+bool nsWindow::WaylandRequestsUpdatingEGLSurface() {
|
||||
+ if (mContainer) {
|
||||
+ return moz_container_egl_surface_needs_update(MOZ_CONTAINER(mContainer));
|
||||
+ }
|
||||
+
|
||||
+ NS_WARNING(
|
||||
+ "nsWindow::WaylandSurfaceNeedsClear(): We don't have any mContainer!");
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_X11
|
||||
diff --git widget/gtk/nsWindow.h widget/gtk/nsWindow.h
|
||||
index b528ebfdeccb..ea0be70d7eb2 100644
|
||||
--- widget/gtk/nsWindow.h
|
||||
+++ widget/gtk/nsWindow.h
|
||||
@@ -373,6 +373,7 @@ class nsWindow final : public nsBaseWidget {
|
||||
wl_display* GetWaylandDisplay();
|
||||
wl_surface* GetWaylandSurface();
|
||||
bool WaylandSurfaceNeedsClear();
|
||||
+ bool WaylandRequestsUpdatingEGLSurface();
|
||||
#endif
|
||||
virtual void GetCompositorWidgetInitData(
|
||||
mozilla::widget::CompositorWidgetInitData* aInitData) override;
|
@ -1,31 +0,0 @@
|
||||
commit ba954951557e
|
||||
Author: sotaro <sotaro.ikeda.g@gmail.com>
|
||||
Date: Mon Feb 18 09:15:30 2019 +0000
|
||||
|
||||
Bug 1527556 - Change MAX_DISPLAY_CONNECTIONS to 3 r=stransky
|
||||
|
||||
nsWaylandDisplay needs to be allocated for each calling thread(main thread, compositor thread and render thread)
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D20118
|
||||
|
||||
--HG--
|
||||
extra : moz-landing-system : lando
|
||||
---
|
||||
widget/gtk/nsWaylandDisplay.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git widget/gtk/nsWaylandDisplay.cpp widget/gtk/nsWaylandDisplay.cpp
|
||||
index 4c2804be2831..ac01e1f50347 100644
|
||||
--- widget/gtk/nsWaylandDisplay.cpp
|
||||
+++ widget/gtk/nsWaylandDisplay.cpp
|
||||
@@ -14,7 +14,9 @@
|
||||
namespace mozilla {
|
||||
namespace widget {
|
||||
|
||||
-#define MAX_DISPLAY_CONNECTIONS 2
|
||||
+// nsWaylandDisplay needs to be created for each calling thread(main thread,
|
||||
+// compositor thread and render thread)
|
||||
+#define MAX_DISPLAY_CONNECTIONS 3
|
||||
|
||||
static nsWaylandDisplay *gWaylandDisplays[MAX_DISPLAY_CONNECTIONS];
|
||||
static StaticMutex gWaylandDisplaysMutex;
|
@ -1,218 +0,0 @@
|
||||
commit 1579a88e491f
|
||||
Author: sotaro <sotaro.ikeda.g@gmail.com>
|
||||
Date: Mon Feb 25 12:15:50 2019 +0000
|
||||
|
||||
Bug 1527804 - Trigger composite from frame_callback_handler() r=stransky
|
||||
|
||||
Bug 1514156 expects that nsWindow::OnExposeEvent() is called after frame_callback_handler() called. But it did not happen during opening add-ons(gecko profiler). Then we need to trigger rendering directly from frame_callback_handler() call.
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D20272
|
||||
|
||||
--HG--
|
||||
extra : moz-landing-system : lando
|
||||
---
|
||||
widget/gtk/mozcontainer.cpp | 20 +++++++++----------
|
||||
widget/gtk/mozcontainer.h | 7 +++++--
|
||||
widget/gtk/nsWindow.cpp | 48 ++++++++++++++++++++++++++++++---------------
|
||||
widget/gtk/nsWindow.h | 4 +++-
|
||||
4 files changed, 50 insertions(+), 29 deletions(-)
|
||||
|
||||
diff --git widget/gtk/mozcontainer.cpp widget/gtk/mozcontainer.cpp
|
||||
index 77ac02e2a049..efe5f7ba86e3 100644
|
||||
--- widget/gtk/mozcontainer.cpp
|
||||
+++ widget/gtk/mozcontainer.cpp
|
||||
@@ -160,7 +160,7 @@ void moz_container_init(MozContainer *container) {
|
||||
// We can draw to x11 window any time.
|
||||
container->ready_to_draw = GDK_IS_X11_DISPLAY(gdk_display_get_default());
|
||||
container->surface_needs_clear = true;
|
||||
- container->egl_surface_needs_update = false;
|
||||
+ container->inital_draw_cb = nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -178,12 +178,18 @@ static void frame_callback_handler(void *data, struct wl_callback *callback,
|
||||
uint32_t time) {
|
||||
MozContainer *container = MOZ_CONTAINER(data);
|
||||
g_clear_pointer(&container->frame_callback_handler, wl_callback_destroy);
|
||||
- if (!container->ready_to_draw) {
|
||||
- container->egl_surface_needs_update = true;
|
||||
+ if (!container->ready_to_draw && container->inital_draw_cb) {
|
||||
+ container->inital_draw_cb();
|
||||
}
|
||||
container->ready_to_draw = true;
|
||||
}
|
||||
|
||||
+void moz_container_set_initial_draw_callback(
|
||||
+ MozContainer *container,
|
||||
+ std::function<void(void)> inital_draw_cb) {
|
||||
+ container->inital_draw_cb = inital_draw_cb;
|
||||
+}
|
||||
+
|
||||
static const struct wl_callback_listener frame_listener = {
|
||||
frame_callback_handler};
|
||||
|
||||
@@ -214,8 +220,8 @@ static void moz_container_unmap_wayland(MozContainer *container) {
|
||||
g_clear_pointer(&container->frame_callback_handler, wl_callback_destroy);
|
||||
|
||||
container->surface_needs_clear = true;
|
||||
- container->egl_surface_needs_update = false;
|
||||
container->ready_to_draw = false;
|
||||
+ container->inital_draw_cb = nullptr;
|
||||
}
|
||||
|
||||
static gint moz_container_get_scale(MozContainer *container) {
|
||||
@@ -560,12 +566,6 @@ gboolean moz_container_surface_needs_clear(MozContainer *container) {
|
||||
container->surface_needs_clear = false;
|
||||
return state;
|
||||
}
|
||||
-
|
||||
-gboolean moz_container_egl_surface_needs_update(MozContainer *container){
|
||||
- gboolean state = container->egl_surface_needs_update;
|
||||
- container->egl_surface_needs_update = false;
|
||||
- return state;
|
||||
-}
|
||||
#endif
|
||||
|
||||
void moz_container_force_default_visual(MozContainer *container) {
|
||||
diff --git widget/gtk/mozcontainer.h widget/gtk/mozcontainer.h
|
||||
index ae6d656646c8..51be814ef975 100644
|
||||
--- widget/gtk/mozcontainer.h
|
||||
+++ widget/gtk/mozcontainer.h
|
||||
@@ -9,6 +9,7 @@
|
||||
#define __MOZ_CONTAINER_H__
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
+#include <functional>
|
||||
|
||||
/*
|
||||
* MozContainer
|
||||
@@ -77,8 +78,8 @@ struct _MozContainer {
|
||||
struct wl_egl_window *eglwindow;
|
||||
struct wl_callback *frame_callback_handler;
|
||||
gboolean surface_needs_clear;
|
||||
- gboolean egl_surface_needs_update;
|
||||
gboolean ready_to_draw;
|
||||
+ std::function<void(void)> inital_draw_cb;
|
||||
#endif
|
||||
gboolean force_default_visual;
|
||||
};
|
||||
@@ -101,7 +102,9 @@ gboolean moz_container_has_wl_egl_window(MozContainer *container);
|
||||
gboolean moz_container_surface_needs_clear(MozContainer *container);
|
||||
void moz_container_scale_changed(MozContainer *container,
|
||||
GtkAllocation *aAllocation);
|
||||
-gboolean moz_container_egl_surface_needs_update(MozContainer *container);
|
||||
+void moz_container_set_initial_draw_callback(
|
||||
+ MozContainer *container,
|
||||
+ std::function<void(void)> inital_draw_cb);
|
||||
#endif
|
||||
|
||||
#endif /* __MOZ_CONTAINER_H__ */
|
||||
diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp
|
||||
index acb957d3fb55..54b121ec5514 100644
|
||||
--- widget/gtk/nsWindow.cpp
|
||||
+++ widget/gtk/nsWindow.cpp
|
||||
@@ -675,6 +675,12 @@ void nsWindow::Destroy() {
|
||||
gFocusWindow = nullptr;
|
||||
}
|
||||
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ if (mContainer) {
|
||||
+ moz_container_set_initial_draw_callback(mContainer, nullptr);
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
GtkWidget *owningWidget = GetMozContainerWidget();
|
||||
if (mShell) {
|
||||
gtk_widget_destroy(mShell);
|
||||
@@ -1860,6 +1866,23 @@ static bool ExtractExposeRegion(LayoutDeviceIntRegion &aRegion, cairo_t *cr) {
|
||||
return true;
|
||||
}
|
||||
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+void nsWindow::WaylandEGLSurfaceForceRedraw() {
|
||||
+ MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
+
|
||||
+ if (mIsDestroyed) {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (CompositorBridgeChild* remoteRenderer = GetRemoteRenderer()) {
|
||||
+ if (mCompositorWidgetDelegate) {
|
||||
+ mCompositorWidgetDelegate->RequestsUpdatingEGLSurface();
|
||||
+ }
|
||||
+ remoteRenderer->SendForcePresent();
|
||||
+ }
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
gboolean nsWindow::OnExposeEvent(cairo_t *cr) {
|
||||
// Send any pending resize events so that layout can update.
|
||||
// May run event loop.
|
||||
@@ -1888,11 +1911,6 @@ gboolean nsWindow::OnExposeEvent(cairo_t *cr) {
|
||||
region.ScaleRoundOut(scale, scale);
|
||||
|
||||
if (GetLayerManager()->AsKnowsCompositor() && mCompositorSession) {
|
||||
-#ifdef MOZ_WAYLAND
|
||||
- if(mCompositorWidgetDelegate && WaylandRequestsUpdatingEGLSurface()) {
|
||||
- mCompositorWidgetDelegate->RequestsUpdatingEGLSurface();
|
||||
- }
|
||||
-#endif
|
||||
// We need to paint to the screen even if nothing changed, since if we
|
||||
// don't have a compositing window manager, our pixels could be stale.
|
||||
GetLayerManager()->SetNeedsComposite(true);
|
||||
@@ -3454,6 +3472,15 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent,
|
||||
// Create a container to hold child windows and child GtkWidgets.
|
||||
GtkWidget *container = moz_container_new();
|
||||
mContainer = MOZ_CONTAINER(container);
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ if (!mIsX11Display && ComputeShouldAccelerate()) {
|
||||
+ RefPtr<nsWindow> self(this);
|
||||
+ moz_container_set_initial_draw_callback(mContainer,
|
||||
+ [self]() -> void {
|
||||
+ self->WaylandEGLSurfaceForceRedraw();
|
||||
+ });
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
// "csd" style is set when widget is realized so we need to call
|
||||
// it explicitly now.
|
||||
@@ -6564,17 +6591,6 @@ bool nsWindow::WaylandSurfaceNeedsClear() {
|
||||
"nsWindow::WaylandSurfaceNeedsClear(): We don't have any mContainer!");
|
||||
return false;
|
||||
}
|
||||
-
|
||||
-bool nsWindow::WaylandRequestsUpdatingEGLSurface() {
|
||||
- if (mContainer) {
|
||||
- return moz_container_egl_surface_needs_update(MOZ_CONTAINER(mContainer));
|
||||
- }
|
||||
-
|
||||
- NS_WARNING(
|
||||
- "nsWindow::WaylandSurfaceNeedsClear(): We don't have any mContainer!");
|
||||
- return false;
|
||||
-}
|
||||
-
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_X11
|
||||
diff --git widget/gtk/nsWindow.h widget/gtk/nsWindow.h
|
||||
index 5d119b4911e1..dbced693be1c 100644
|
||||
--- widget/gtk/nsWindow.h
|
||||
+++ widget/gtk/nsWindow.h
|
||||
@@ -245,6 +245,9 @@ class nsWindow final : public nsBaseWidget {
|
||||
|
||||
void DispatchContextMenuEventFromMouseEvent(uint16_t domButton,
|
||||
GdkEventButton* aEvent);
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ void WaylandEGLSurfaceForceRedraw();
|
||||
+#endif
|
||||
|
||||
public:
|
||||
void ThemeChanged(void);
|
||||
@@ -342,7 +345,6 @@ class nsWindow final : public nsBaseWidget {
|
||||
wl_display* GetWaylandDisplay();
|
||||
wl_surface* GetWaylandSurface();
|
||||
bool WaylandSurfaceNeedsClear();
|
||||
- bool WaylandRequestsUpdatingEGLSurface();
|
||||
#endif
|
||||
virtual void GetCompositorWidgetInitData(
|
||||
mozilla::widget::CompositorWidgetInitData* aInitData) override;
|
@ -1,31 +0,0 @@
|
||||
Always pass -Isilk/fixed to unbreak on aarch64 after bug 1522016
|
||||
|
||||
diff --git media/libopus/moz.build media/libopus/moz.build
|
||||
index cc82c8e6a616..e83a70f94e0a 100644
|
||||
--- media/libopus/moz.build
|
||||
+++ media/libopus/moz.build
|
||||
@@ -63,6 +63,8 @@ LOCAL_INCLUDES += [
|
||||
'celt',
|
||||
'include',
|
||||
'silk',
|
||||
+ 'silk/fixed',
|
||||
+ 'silk/float',
|
||||
'src',
|
||||
]
|
||||
|
||||
@@ -76,15 +78,9 @@ UNIFIED_SOURCES += opus_sources
|
||||
SOURCES += opus_nonunified_sources
|
||||
|
||||
if CONFIG['MOZ_SAMPLE_TYPE_FLOAT32']:
|
||||
- LOCAL_INCLUDES += [
|
||||
- 'silk/float',
|
||||
- ]
|
||||
UNIFIED_SOURCES += silk_sources_float
|
||||
UNIFIED_SOURCES += opus_sources_float
|
||||
else:
|
||||
- LOCAL_INCLUDES += [
|
||||
- 'silk/fixed',
|
||||
- ]
|
||||
UNIFIED_SOURCES += silk_sources_fixed
|
||||
|
||||
if CONFIG['CPU_ARCH'] in ('x86', 'x86_64'):
|
@ -1,106 +0,0 @@
|
||||
commit 554777b1d130
|
||||
Author: sotaro <sotaro.ikeda.g@gmail.com>
|
||||
Date: Wed Mar 6 08:17:51 2019 +0000
|
||||
|
||||
Bug 1532024 - Handle a case that GetRemoteRenderer() returned nullptr r=stransky
|
||||
|
||||
Differential Revision: https://phabricator.services.mozilla.com/D21831
|
||||
|
||||
--HG--
|
||||
extra : moz-landing-system : lando
|
||||
---
|
||||
widget/gtk/nsWindow.cpp | 27 ++++++++++++++++++---------
|
||||
widget/gtk/nsWindow.h | 3 +++
|
||||
2 files changed, 21 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git widget/gtk/nsWindow.cpp widget/gtk/nsWindow.cpp
|
||||
index 96faeea1cf87..46956412f341 100644
|
||||
--- widget/gtk/nsWindow.cpp
|
||||
+++ widget/gtk/nsWindow.cpp
|
||||
@@ -399,6 +399,10 @@ nsWindow::nsWindow() {
|
||||
mXDepth = 0;
|
||||
#endif /* MOZ_X11 */
|
||||
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ mNeedsUpdatingEGLSurface = false;
|
||||
+#endif
|
||||
+
|
||||
if (!gGlobalsInitialized) {
|
||||
gGlobalsInitialized = true;
|
||||
|
||||
@@ -1872,12 +1876,14 @@ static bool ExtractExposeRegion(LayoutDeviceIntRegion &aRegion, cairo_t *cr) {
|
||||
void nsWindow::WaylandEGLSurfaceForceRedraw() {
|
||||
MOZ_RELEASE_ASSERT(NS_IsMainThread());
|
||||
|
||||
- if (mIsDestroyed) {
|
||||
+ if (mIsDestroyed || !mNeedsUpdatingEGLSurface) {
|
||||
return;
|
||||
}
|
||||
|
||||
- if (CompositorBridgeChild* remoteRenderer = GetRemoteRenderer()) {
|
||||
+ if (CompositorBridgeChild *remoteRenderer = GetRemoteRenderer()) {
|
||||
+ MOZ_ASSERT(mCompositorWidgetDelegate);
|
||||
if (mCompositorWidgetDelegate) {
|
||||
+ mNeedsUpdatingEGLSurface = false;
|
||||
mCompositorWidgetDelegate->RequestsUpdatingEGLSurface();
|
||||
}
|
||||
remoteRenderer->SendForcePresent();
|
||||
@@ -3483,10 +3489,10 @@ nsresult nsWindow::Create(nsIWidget *aParent, nsNativeWidget aNativeParent,
|
||||
#ifdef MOZ_WAYLAND
|
||||
if (!mIsX11Display && ComputeShouldAccelerate()) {
|
||||
RefPtr<nsWindow> self(this);
|
||||
- moz_container_set_initial_draw_callback(mContainer,
|
||||
- [self]() -> void {
|
||||
- self->WaylandEGLSurfaceForceRedraw();
|
||||
- });
|
||||
+ moz_container_set_initial_draw_callback(mContainer, [self]() -> void {
|
||||
+ self->mNeedsUpdatingEGLSurface = true;
|
||||
+ self->WaylandEGLSurfaceForceRedraw();
|
||||
+ });
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -6058,6 +6064,9 @@ void nsWindow::SetCompositorWidgetDelegate(CompositorWidgetDelegate *delegate) {
|
||||
MOZ_ASSERT(mCompositorWidgetDelegate,
|
||||
"nsWindow::SetCompositorWidgetDelegate called with a "
|
||||
"non-PlatformCompositorWidgetDelegate");
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ WaylandEGLSurfaceForceRedraw();
|
||||
+#endif
|
||||
} else {
|
||||
mCompositorWidgetDelegate = nullptr;
|
||||
}
|
||||
@@ -6543,8 +6552,7 @@ nsWindow::CSDSupportLevel nsWindow::GetSystemCSDSupportLevel() {
|
||||
// Check for Mutter regression on X.org (Bug 1530252). In that case we
|
||||
// don't hide system titlebar by default as we can't draw transparent
|
||||
// corners reliably.
|
||||
-bool nsWindow::TitlebarCanUseShapeMask()
|
||||
-{
|
||||
+bool nsWindow::TitlebarCanUseShapeMask() {
|
||||
static int canUseShapeMask = -1;
|
||||
if (canUseShapeMask != -1) {
|
||||
return canUseShapeMask;
|
||||
@@ -6574,7 +6582,8 @@ bool nsWindow::HideTitlebarByDefault() {
|
||||
// When user defined widget.default-hidden-titlebar don't do any
|
||||
// heuristics and just follow it.
|
||||
if (Preferences::HasUserValue("widget.default-hidden-titlebar")) {
|
||||
- hideTitlebar = Preferences::GetBool("widget.default-hidden-titlebar", false);
|
||||
+ hideTitlebar =
|
||||
+ Preferences::GetBool("widget.default-hidden-titlebar", false);
|
||||
return hideTitlebar;
|
||||
}
|
||||
|
||||
diff --git widget/gtk/nsWindow.h widget/gtk/nsWindow.h
|
||||
index 309905757431..ae2ebd350af4 100644
|
||||
--- widget/gtk/nsWindow.h
|
||||
+++ widget/gtk/nsWindow.h
|
||||
@@ -433,6 +433,9 @@ class nsWindow final : public nsBaseWidget {
|
||||
bool mIsDragPopup;
|
||||
// Can we access X?
|
||||
bool mIsX11Display;
|
||||
+#ifdef MOZ_WAYLAND
|
||||
+ bool mNeedsUpdatingEGLSurface;
|
||||
+#endif
|
||||
|
||||
private:
|
||||
void DestroyChildWindows();
|
15
www/firefox/files/patch-bug1536126
Normal file
15
www/firefox/files/patch-bug1536126
Normal file
@ -0,0 +1,15 @@
|
||||
Disable RDD on Tier3 platforms due to lack of sandboxing and perf degradation.
|
||||
|
||||
diff --git modules/libpref/init/StaticPrefList.h modules/libpref/init/StaticPrefList.h
|
||||
index 7df0b518b267..3b309be1bfce 100644
|
||||
--- modules/libpref/init/StaticPrefList.h
|
||||
+++ modules/libpref/init/StaticPrefList.h
|
||||
@@ -1595,7 +1595,7 @@ VARCACHE_PREF(
|
||||
# define PREF_VALUE true
|
||||
#elif defined(XP_MACOSX)
|
||||
# define PREF_VALUE true
|
||||
-#elif defined(XP_UNIX)
|
||||
+#elif defined(XP_LINUX) && !defined(ANDROID)
|
||||
# define PREF_VALUE true
|
||||
#else
|
||||
# define PREF_VALUE false
|
Loading…
Reference in New Issue
Block a user