Граф коммитов

46 Коммитов

Автор SHA1 Сообщение Дата
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Markus Stange 7b1b52b19b Bug 1592739 - Stop using the vibrant region as the transparent region. r=mattwoodrow
This code was assuming that the only non-opaque parts of compositor rendering would be the
parts of the window that had vibrancy. But now that the default window background is transparent,
we can have non-vibrant parts where we render into transparency. Dialog windows such as sheet
windows are an example of this.
So instead of using the non-vibrant region of the window as its opaque region, we now use
the region that is covered by opaque Gecko layers. This region is a lot more conservative:
For example, the main browser chrome is now entirely transparent, because the chrome's opaque
parts share a layer with its transparent parts.
As a result, this change slightly affects the CALayer partitioning in the main browser window:
The entire browser chrome is now transparent, not just the tab bar.
The web content area is still opaque.

I think this will be fine. The thing I'm most concerned about is that scrolling inside web
content might cause invalidations of pixels from the chrome, because then we'd recomposite
the CALayers that cover the vibrant tab bar. This doesn't seem to happen most of the time
though, from what I can tell.

Differential Revision: https://phabricator.services.mozilla.com/D51466
2020-06-11 18:46:04 +00:00
Markus Stange ac0687ac8b Back out bug 1592739 due to multiple regressions (bug 1599366, bug 1601183, bug 1602193). a=backout
Differential Revision: https://phabricator.services.mozilla.com/D62753

--HG--
extra : moz-landing-system : lando
2020-02-13 14:26:51 +00:00
Markus Stange df49f517a5 Bug 1597585 - Make LayerManagerComposite use mGL to pass the GL context to PreRender, just like WebRender. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D53772

--HG--
extra : moz-landing-system : lando
2019-11-20 23:22:58 +00:00
Markus Stange d582a45148 Bug 1597585 - Remove WidgetRenderingContext's unused field mCompositor. r=mattwoodrow
The only use of this was inside Android's nsWindow::PreRender.
That method was removed in changeset 81de9d1439b0e352729142f6aa2914674073da03 (bug 1335895).

Differential Revision: https://phabricator.services.mozilla.com/D53771

--HG--
extra : moz-landing-system : lando
2019-11-20 23:22:18 +00:00
Markus Stange d3a4eb5918 Bug 1576390 - Remove now-unused DrawWindowOverlay and WindowOverlayChanged methods. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D52748

--HG--
extra : moz-landing-system : lando
2019-11-13 02:24:06 +00:00
Markus Stange c0cdef1454 Bug 1592739 - Stop using the vibrant region as the transparent region. r=mattwoodrow
This code was assuming that the only non-opaque parts of compositor rendering would be the
parts of the window that had vibrancy. But now that the default window background is transparent,
we can have non-vibrant parts where we render into transparency. Dialog windows such as sheet
windows are an example of this.
So instead of using the non-vibrant region of the window as its opaque region, we now use
the region that is covered by opaque Gecko layers. This region is a lot more conservative:
For example, the main browser chrome is now entirely transparent, because the chrome's opaque
parts share a layer with its transparent parts.
As a result, this change slightly affects the CALayer partitioning in the main browser window:
The entire browser chrome is now transparent, not just the tab bar.
The web content area is still opaque.

I think this will be fine. The thing I'm most concerned about is that scrolling inside web
content might cause invalidations of pixels from the chrome, because then we'd recomposite
the CALayers that cover the vibrant tab bar. This doesn't seem to happen most of the time
though, from what I can tell.

Differential Revision: https://phabricator.services.mozilla.com/D51466

--HG--
extra : moz-landing-system : lando
2019-11-05 19:04:14 +00:00
Markus Stange 3503a868b7 Bug 1574592 - Remove unused CompositorWidget::DrawWindowUnderlay. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D42404

--HG--
extra : moz-landing-system : lando
2019-08-25 17:11:11 +00:00
Markus Stange 28d283ab15 Bug 1574592 - Remove now-unused CompositorWidget::DoCompositorCleanup again. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D42403

--HG--
extra : moz-landing-system : lando
2019-08-25 17:11:02 +00:00
Markus Stange e0e54098e9 Bug 1574592 - Move NativeLayer management out of nsChildView and into LayerManagerComposite and RendererOGL. r=mattwoodrow
It looks like a big patch but it's mostly just moved code, with some duplication:
 - Layer creation and destruction moves to LayerManagerComposite and RendererOGL.
 - BasicCompositor IOSurface setup code moves to BasicCompositor.cpp.
 - OpenGL IOSurface setup code moves to CompositorOGL and RenderCompositorOGL.

The duplication is a bit unfortunate but the LayerManagerComposite code will
diverge from the WebRender code soon.

BeginFrame gets a new argument aNativeLayer. This argument will go away again
over the course of this patch queue. But for now, BeginFrame is the best place
to do the layer setup because it's a very close place to PreRender which is
where that code was previously.

I wasn't able to think of a nice way to give CompositorOGL and BasicCompositor
platform-specific behavior without #ifdefs. So now LayerManagerComposite uses
the "cross-platform" NativeLayer interface, but CompositorOGL and
BasicCompositor use NativeLayerCA because they actually need the IOSurface, and
they do that in #ifdef'd code.
Luckily, NativeLayerCA.h can be included in both .cpp files and in .mm files.

Differential Revision: https://phabricator.services.mozilla.com/D42402

--HG--
extra : moz-landing-system : lando
2019-08-25 17:43:42 +00:00
Markus Stange c3d94ae29a Bug 1574592 - Add CompositorWidget::GetOpaqueWidgetRegion. r=mattwoodrow
This lets LayerManagerComposite and RendererOGL set the correct opaque region
on the native layer.

Differential Revision: https://phabricator.services.mozilla.com/D42401

--HG--
extra : moz-landing-system : lando
2019-08-25 21:41:58 +00:00
Markus Stange 222be5a822 Bug 1574592 - Add CompositorWidget::GetNativeLayerRoot. r=mattwoodrow
This will give the layer manager direct access to the native layers.

Differential Revision: https://phabricator.services.mozilla.com/D42400

--HG--
extra : moz-landing-system : lando
2019-08-25 17:10:52 +00:00
Markus Stange 66fc92f4e1 Bug 1573343 - Stop using LayoutDevice units in BasicCompositor. r=mattwoodrow
ScreenPixels would be a more appropriate unit. But inside BasicCompositor everything
is in the same coordinate space anyway so we're not getting much benefit from the
units. This patch eliminates a lot of .ToUnknown*() calls.

Differential Revision: https://phabricator.services.mozilla.com/D41680

--HG--
extra : moz-landing-system : lando
2019-08-19 22:40:55 +00:00
Markus Stange cc120aa3b7 Bug 1573343 - Make the aInvalidRegion parameter of EndRemoteDrawing a const reference rather than a regular reference. r=mattwoodrow
There's no point in mutating it, and nobody does.

Differential Revision: https://phabricator.services.mozilla.com/D41679

--HG--
extra : moz-landing-system : lando
2019-08-19 22:40:39 +00:00
Markus Stange 19c25b1d89 Bug 1573343 - Move draw target clearing out of GetBackBufferDrawTarget. r=mattwoodrow
On Windows, where the DrawTarget is rewrapped in a Cairo/pixman DrawTarget,
this will now cause Cairo/pixman to be used for the clear.

Differential Revision: https://phabricator.services.mozilla.com/D41673

--HG--
extra : moz-landing-system : lando
2019-08-19 22:39:00 +00:00
Markus Stange 62430de27f Bug 1491442 - Add CompositorWidget::DoCompositorCleanup() to give the widget a chance to clean up any state from PreRender/PostRender on the correct thread. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D40514

--HG--
extra : moz-landing-system : lando
2019-08-16 01:09:26 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Martin Stransky da41393bd7 Bug 1425842 - Rename X11CompositorWidget to GtkCompositorWidget and implement WindowSurfaceWayland support, r=jhorak
- Rename X11CompositorWidget to GtkCompositorWidget to handle both X11 and Wayland backends.
- Rename X11CompositorWidgetInitData to GtkCompositorWidgetInitData
- Implement Wayland support at WindowSurfaceProvider, WindowSurfaceProvider::CreateWindowSurface()
  is able to create WindowSurfaceWayland.
- Initialize Wayland surface provider at nsWindow::Create()

MozReview-Commit-ID: 1WvR9nWHa3L

--HG--
rename : widget/gtk/X11CompositorWidget.cpp => widget/gtk/GtkCompositorWidget.cpp
rename : widget/gtk/X11CompositorWidget.h => widget/gtk/GtkCompositorWidget.h
rename : widget/gtk/InProcessX11CompositorWidget.cpp => widget/gtk/InProcessGtkCompositorWidget.cpp
rename : widget/gtk/InProcessX11CompositorWidget.h => widget/gtk/InProcessGtkCompositorWidget.h
extra : rebase_source : d54186515b066b957d8ad05bb5540db55f2e9415
2017-12-18 20:20:02 +01:00
Michael Smith 6fcebfbe5b Bug 1373739 - Make headless compositing Windows-compatible, in addition to Linux. r=dvander
To make the HeadlessCompositorWidget work under Windows as well as Linux, I had
to change the way that I hooked it into the existing CompositorWidget system.
Under GTK, the CompositorWidgetInitData and CompositorWidgetDelegate types
provided the information needed by the headless compositor widget already (the
widget client size). On Windows, however, the definitions of these types
differ, and the client size information is simply retrieved from the platform
APIs when needed.

After this patch, CompositorWidgetDelegate is renamed to
PlatformCompositorWidgetDelegate, and a new base class called
CompositorWidgetDelegate is added with "AsPlatformSpecificDelegate()" and
"AsHeadlessCompositorWidget()" methods. In non-headless mode, widgets use
AsPlatformSpecificDelegate() to access the Windows- and GTK-specific delegate
APIs. In headless mode, AsHeadlessCompositorWidget() is used to access the
singular CompositorWidget implementation for headless. Meanwhile, the
CompositorWidgetInitData IPDL type is made into a union which always contains a
headless-specific HeadlessCompositorWidgetInitData struct and under GTK and
Windows also contains an {X11,Win}CompositorWidgetInitData struct.

This also includes a small patch to ensure that the GPU process and
hardware-accelerated compositing are always disabled under headless mode. These
features weren't activated by default in the Linux environments I tested in, but
did end up activating (and then promptly crashing Firefox) when I tested on
Windows.

MozReview-Commit-ID: CocPoHBDV7H

--HG--
extra : rebase_source : 4581fa63aa3a9f32a8dc2672015a35b9be01b20f
2017-07-06 17:45:34 -07:00
David Anderson bae9947dc4 Add IsHidden to CompositorWidget. (bug 1365879 part 10, r=rhunt) 2017-06-20 01:17:19 -07:00
David Anderson d2703c8176 Remove Composer2D remnants. (bug 1339353, r=kats) 2017-02-14 12:29:39 -08:00
Ryan Hunt 04951a435e Merge m-c to graphics 2017-01-13 10:14:22 -06:00
Kartikaya Gupta ac6cc8ce06 Bug 1330037 - Propagate the CompositorOptions to all CompositorWidget instances. r=dvander
MozReview-Commit-ID: DFeeo2WNmhZ

--HG--
extra : rebase_source : d40bea7f726df007e3f079bb9576e1cbe17e3460
2017-01-12 17:29:42 -05:00
Mozilla Graphics Team 9cc9061246 Bug 1317774 - Add non-gfx code needed to use WebRender in gecko. r=gfx
This completes the migration of code from the github branch to the graphics
project repo. At this point all webrender-related code should be disabled
unless --enable-webrender is provided in the mozconfig.

MozReview-Commit-ID: Dea8rxM6UPL
2016-11-16 08:54:51 -05:00
Kartikaya Gupta 54c54c7a09 Bug 1315706 - Pass a wrapper struct to various CompositorWidget functions. r=dvander
This is the first step in using these functions without having a
LayerManagerComposite at all.

MozReview-Commit-ID: 2zkuB7Ox4Ut

--HG--
extra : rebase_source : b23988275f5851a2fd30bd3e8a9931107a224c66
2016-11-07 21:16:52 -05:00
Jim Chen 3587a0edd6 Bug 1306083 - 1. Use AndroidCompositorWidget to access GeckoLayerClient; r=kats
Add AndroidCompositorWidget to act as the intermediary between gfx code
and GeckoLayerClient, in place of AndroidBridge. AndroidCompositorWidget
currently inherits from InProcessCompositorWidget, but when Android
eventually supports OOP compositing, it will be made to inherit from
CompositorWidget directly.
2016-10-03 12:26:00 -04:00
Ryan Hunt 9aa1274fbd Bug 1289251 - Create a CompositorWidget for GTK+X11 platform. r=acomminos,jrmuizel
MozReview-Commit-ID: 1eq3rRwv1g3

--HG--
extra : rebase_source : a6a5a51d58009beb4219586014cc512ecb28ea20
2016-07-22 10:23:07 -07:00
Sebastian Hengst 0f39134046 Backed out changeset c0285428a8a0 (bug 1289251) 2016-09-02 10:25:43 +02:00
Ryan Hunt 8c1ca9e531 Bug 1289251 - Create a CompositorWidget for GTK+X11 platform. r=acomminos,jrmuizel
MozReview-Commit-ID: 1eq3rRwv1g3

--HG--
extra : rebase_source : 525f7e0c20fd166d8e6420e8d692edb3459b2d7a
2016-07-22 10:23:07 -07:00
Sotaro Ikeda 1ff245b181 Bug 1259571 - Reduce tearing with basic layers on Windows r=dvander
--HG--
rename : gfx/thebes/DeviceManagerD3D11.cpp => gfx/thebes/DeviceManagerDx.cpp
rename : gfx/thebes/DeviceManagerD3D11.h => gfx/thebes/DeviceManagerDx.h
2016-08-23 15:18:55 -07:00
Carsten "Tomcat" Book 90f6c2d3fd Backed out changeset 02d76f158f3d (bug 1259571) for talos xperf regressions
--HG--
rename : gfx/thebes/DeviceManagerDx.cpp => gfx/thebes/DeviceManagerD3D11.cpp
rename : gfx/thebes/DeviceManagerDx.h => gfx/thebes/DeviceManagerD3D11.h
2016-08-08 11:53:51 +02:00
Sotaro Ikeda 41a9daf725 Bug 1259571 - Try tearing-free drawing with GDI r=dvander,mattwoodrow
--HG--
rename : gfx/thebes/DeviceManagerD3D11.cpp => gfx/thebes/DeviceManagerDx.cpp
rename : gfx/thebes/DeviceManagerD3D11.h => gfx/thebes/DeviceManagerDx.h
2016-08-07 23:54:12 -07:00
David Anderson 969d03ec34 Implement vsync notification for remote compositors. (bug 1285625 part 3, r=mchang) 2016-07-19 11:56:07 -07:00
David Anderson 0bdcce6956 Don't expose CompositorVsyncDispatcher from CompositorWidget. (bug 1285625 part 2, r=mchang) 2016-07-19 11:56:07 -07:00
David Anderson 98133d3c0a Implement remote CompositorWidgets on Windows. (bug 1281998 part 7, r=billm) 2016-07-01 01:15:16 -07:00
David Anderson 97a92d5d5e Extract a delegate interface out of WinCompositorWidget. (bug 1281998 part 6, r=jimm) 2016-07-01 01:15:16 -07:00
David Anderson 6562af780a Move CompositorWidget construction out of nsIWidget. (bug 1281998 part 5, r=jimm) 2016-07-01 01:15:16 -07:00
David Anderson 56c221c4a6 Move InProcessCompositorWidget to its own file. (bug 1281998 part 3, r=jimm)
--HG--
rename : widget/CompositorWidget.cpp => widget/InProcessCompositorWidget.cpp
2016-07-01 01:15:16 -07:00
David Anderson 3f0ea0572d Rename CompositorWidgetProxy files to CompositorWidget. (bug 1281998 part 2, r=jimm)
--HG--
rename : widget/CompositorWidgetProxy.cpp => widget/CompositorWidget.cpp
rename : widget/CompositorWidgetProxy.h => widget/CompositorWidget.h
rename : widget/windows/WinCompositorWidgetProxy.cpp => widget/windows/WinCompositorWidget.cpp
rename : widget/windows/WinCompositorWidgetProxy.h => widget/windows/WinCompositorWidget.h
2016-07-01 01:15:16 -07:00
Phil Ringnalda 0d0d24bccc Back out 7 changesets (bug 1281998) for Windows Marionette crashes
Backed out changeset d806fac2c856 (bug 1281998)
Backed out changeset b8d4fedfd7eb (bug 1281998)
Backed out changeset a72929c0c3ec (bug 1281998)
Backed out changeset 74198f88fa37 (bug 1281998)
Backed out changeset 54a0e73f6906 (bug 1281998)
Backed out changeset 99d1da1293b7 (bug 1281998)
Backed out changeset a5a9585754b1 (bug 1281998)

--HG--
rename : widget/CompositorWidget.cpp => widget/CompositorWidgetProxy.cpp
rename : widget/CompositorWidget.h => widget/CompositorWidgetProxy.h
rename : widget/windows/WinCompositorWidget.cpp => widget/windows/WinCompositorWidgetProxy.cpp
rename : widget/windows/WinCompositorWidget.h => widget/windows/WinCompositorWidgetProxy.h
2016-06-29 19:35:24 -07:00
David Anderson faac928c5a Implement remote CompositorWidgets on Windows. (bug 1281998 part 7, r=billm)
--HG--
extra : rebase_source : 7027c4477e5f7432779e1b8389255b8a808f42b8
2016-06-29 16:47:23 -04:00
David Anderson 4853817add Extract a delegate interface out of WinCompositorWidget. (bug 1281998 part 6, r=jimm)
--HG--
extra : rebase_source : 66e23a6efd766341a97ab46f1c52b368f145d849
2016-06-29 16:47:23 -04:00
David Anderson 358a567c70 Move CompositorWidget construction out of nsIWidget. (bug 1281998 part 5, r=jimm)
--HG--
extra : rebase_source : 881a2fac4447de3f1aeae3f34f21f9e76a79e0a3
2016-06-29 16:47:22 -04:00
David Anderson b4551c49b7 Move InProcessCompositorWidget to its own file. (bug 1281998 part 3, r=jimm)
--HG--
rename : widget/CompositorWidget.cpp => widget/InProcessCompositorWidget.cpp
extra : rebase_source : d885b1ec9c30e8c5558c31c6caadfc645e7ed567
2016-06-29 16:47:22 -04:00
David Anderson 804c1ee06f Rename CompositorWidgetProxy files to CompositorWidget. (bug 1281998 part 2, r=jimm)
--HG--
rename : widget/CompositorWidgetProxy.cpp => widget/CompositorWidget.cpp
rename : widget/CompositorWidgetProxy.h => widget/CompositorWidget.h
rename : widget/windows/WinCompositorWidgetProxy.cpp => widget/windows/WinCompositorWidget.cpp
rename : widget/windows/WinCompositorWidgetProxy.h => widget/windows/WinCompositorWidget.h
extra : rebase_source : 8ecf59ad6039f0d0d2a51008aef53ef37aa2ce0e
2016-06-29 16:47:22 -04:00