Commit Graph

34634 Commits

Author SHA1 Message Date
Eric Rahm
770e0fc0d2 Bug 1578025 - Remove using namespace std from gfx/vr. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D44307

--HG--
extra : moz-landing-system : lando
2019-09-04 19:32:00 +00:00
Kris Taeleman
eaa0124969 Bug 1522422 - Fixing opacity issue on SVG USE elements in D2D. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D44059

--HG--
extra : moz-landing-system : lando
2019-09-04 13:26:43 +00:00
Gerald Squelart
e1481bf4bb Bug 1576550 - AUTO_PROFILER_STATS(add_marker...) - r=gregtatum
Gather stats for most calls to `profiler_add_marker()`, including the time to
allocate payloads if any.

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

--HG--
extra : moz-landing-system : lando
2019-09-04 07:58:21 +00:00
Gerald Squelart
95f77c2409 Bug 1576819 - Use PROFILER_ADD_MARKER{,_WITH_PAYLOAD} everywhere - r=gregtatum
All calls to `profiler_add_marker()` (outside of the profilers code) are
now replaced by either:
- `PROFILER_ADD_MARKER(name, categoryPair)`
- `PROFILER_ADD_MARKER_WITH_PAYLOAD(name, categoryPair, TypeOfMarkerPayload,
                                    (payload, ..., arguments))`

This makes all calls consistent, and they won't need to prefix the category pair
with `JS::ProfilingCategoryPair::`.

Also it will make it easier to add (and later remove) internal-profiling
instrumentation (bug 1576550), and to replace heap-allocated payloads with
stack-allocated ones (bug 1576555).

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

--HG--
extra : moz-landing-system : lando
2019-09-04 07:56:51 +00:00
sotaro
45201fa9a1 Bug 1578605 - Remove workaround of Bug 1569881 r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D44592

--HG--
extra : moz-landing-system : lando
2019-09-04 02:40:27 +00:00
Tom Ritter
d922064696 Bug 1547519 - Rename NS_STRINGIFY to MOZ_STRINGIFY, move to mfbt, and unify stragglers r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D39961

--HG--
extra : moz-landing-system : lando
2019-09-04 02:40:32 +00:00
Glenn Watson
0b27e4437e Bug 1578340 - Intern local position + spatial node in WR clips. r=nical
Previously, clip nodes interned the local clip information, but
stored the spatial node and the local position as part of the
instance.

This was required since the local position of clips would change
when a new display was sent after scrolling. However, since we
now handle this via external scroll offsets, the local position
is stable, and we can intern both the position and spatial node.

This greatly simplifies some in-progress work for picture caching,
where we want to be able to quickly identify clip chain nodes that
are shared between elements of a display list. With this change,
comparing the item uid of the interned clip node is enough to
guarantee equality of the shared clips.

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

--HG--
extra : moz-landing-system : lando
2019-09-03 15:15:00 +00:00
sotaro
6ad6dcbc80 Bug 1576087 - Split EGLSurface creation from RenderCompositorANGLE::ResizeBufferIfNeeded() r=nical
Differential Revision: https://phabricator.services.mozilla.com/D43212

--HG--
extra : moz-landing-system : lando
2019-09-03 12:36:09 +00:00
Markus Stange
5bc93ccd37 Bug 1578310 - Delete framebuffers for deleted IOSurfaces. r=mattwoodrow
I had accidentally flipped things around so that the framebuffers were only
deleted when a registry was set.

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

--HG--
extra : moz-landing-system : lando
2019-09-03 00:33:31 +00:00
Markus Stange
8b10792aed Bug 1578305 - Remove debug overlay layers in LayerManagerComposite::Destroy(). r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44409

--HG--
extra : moz-landing-system : lando
2019-09-03 00:33:31 +00:00
Eric Rahm
c5497a628a Bug 1577916 - Remove using namespace std from gfx/layers r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44285

--HG--
extra : moz-landing-system : lando
2019-09-02 17:38:31 +00:00
Coroiu Cristina
7b22710544 Backed out changeset 6e0fb526633d (bug 1577916) for build bustage at gfx/layers/composite/TextRenderer.cpp on a CLOSED TREE 2019-09-02 20:15:28 +03:00
Eric Rahm
bb149919a3 Bug 1577916 - Remove using namespace std from gfx/layers r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44285

--HG--
extra : moz-landing-system : lando
2019-09-02 16:53:17 +00:00
Nicolas Silva
5c0955df2d Bug 1577766 - Move render target code into its own file. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D44225

--HG--
extra : moz-landing-system : lando
2019-09-02 11:46:39 +00:00
Nicolas Silva
f730ca72ec Bug 1577766 - Move Frame into frame_builder.rs. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D44224

--HG--
extra : moz-landing-system : lando
2019-09-02 11:47:44 +00:00
Nicolas Silva
c129c7918f Bug 1577766 - Move CompositeOps into display_list_flattener.rs. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D44171

--HG--
extra : moz-landing-system : lando
2019-09-02 11:48:15 +00:00
Nicolas Silva
87c3918219 Bug 1577766 - Rename tiling.rs into render_task_graph.rs and move some code around. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D44165

--HG--
rename : gfx/wr/webrender/src/tiling.rs => gfx/wr/webrender/src/render_task_graph.rs
extra : moz-landing-system : lando
2019-09-02 11:48:15 +00:00
Nicolas Silva
2e3f0733db Bug 1577766 - Rename Renderer::draw_tile_frame into draw_frame. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D44164

--HG--
extra : moz-landing-system : lando
2019-09-02 11:44:20 +00:00
Eric Rahm
8c12aa46aa Bug 1578024 - Remove using namespace std from nsRegion. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44306

--HG--
extra : moz-landing-system : lando
2019-09-02 03:02:26 +00:00
Markus Stange
1ae94e638a Bug 1578100 - Respect the clip when calculating the number of pixels to fill. r=mattwoodrow
This makes the fill rate numbers which are displayed in the FPS overlay a lot more reasonable.
It also requires the TransformAndClipBounds fix from bug 1578045 for correct numbers.

Depends on D44337

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

--HG--
extra : moz-landing-system : lando
2019-09-02 00:40:06 +00:00
Markus Stange
d6940a6a56 Bug 1578100 - Implement LayerManagerComposite::UpdateDebugOverlayNativeLayers(). r=mattwoodrow
This creates and updates layers that draw the same things as RenderDebugOverlay().
The code is duplicated so that the overlay can be independent of the compositing
layer content drawing. All layers need to be drawn first, and the GPU stats from
that layer are shown in mGPUStatsLayer.

Depends on D44336

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

--HG--
extra : moz-landing-system : lando
2019-09-02 01:48:33 +00:00
Markus Stange
8404e52ef7 Bug 1578100 - Factor out DrawTranslationWarningOverlay. r=mattwoodrow
Depends on D44335

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

--HG--
extra : moz-landing-system : lando
2019-09-02 00:37:13 +00:00
Markus Stange
f904099105 Bug 1578100 - Add TextRenderer::RenderTextToDrawTarget. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D44335

--HG--
extra : moz-landing-system : lando
2019-09-02 00:21:40 +00:00
Markus Stange
ba17a54ab1 Bug 1578100 - Factor out surface size computation. r=mattwoodrow
Depends on D44333

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

--HG--
extra : moz-landing-system : lando
2019-09-02 00:11:17 +00:00
Markus Stange
5f6164656a Bug 1578100 - Remove unused aTextSize argument. r=mattwoodrow
Depends on D44332

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

--HG--
extra : moz-landing-system : lando
2019-09-02 00:05:41 +00:00
Markus Stange
6164efc5d6 Bug 1578100 - Use DrawTarget::CopySurface in the text renderer. r=mattwoodrow
Depends on D44330

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:48:50 +00:00
Markus Stange
a847ab162b Bug 1578099 - Remove now-unnecessary default framebuffer functionality from GLContextCGL. r=mattwoodrow
This essentially backs out the two patches from bug 1565668 that added this
functionality.

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

--HG--
extra : moz-landing-system : lando
2019-09-02 00:37:56 +00:00
Markus Stange
9a8cc12a55 Bug 1578099 - Use NativeLayer::NextSurfaceAsFramebuffer in CompositorOGL and remove #ifdefs. r=mattwoodrow
CompositingRenderTargetOGL objects are no longer reused between frames. They are
recreated each frame around a reused framebuffer. This lets us remove the
SetOrigin method again, because we specify the right render target origin on
creation.

Depends on D44328

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:48:36 +00:00
Markus Stange
df38e03696 Bug 1578099 - Tweak CompositingRenderTargetOGL initialization flow. r=mattwoodrow
Depends on D44327

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:45:20 +00:00
Markus Stange
c64f3440ff Bug 1578099 - Change CompositingRenderTargetOGL creation API. r=mattwoodrow
Depends on D44326

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:42:19 +00:00
Markus Stange
85f866aad1 Bug 1578099 - Use NativeLayer::NextSurfaceAsFramebuffer for WebRender. r=mattwoodrow
Depends on D44325

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:36:00 +00:00
Markus Stange
c6660314f0 Bug 1578099 - Add NativeLayer::NextSurfaceAsFramebuffer. r=mattwoodrow
This returns the raw framebuffer GLuint and lets the caller bind it.
Initially I wanted to return a RefPtr<MozFramebuffer>, but then I discovered
that MozFramebuffer is not a refcounted class and prefers UniquePtrs.

Depends on D44324

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

--HG--
extra : moz-landing-system : lando
2019-09-01 22:35:56 +00:00
Markus Stange
96d209cbf3 Bug 1578099 - Use NativeLayer::NextSurfaceAsDrawTarget in BasicCompositor and remove #ifdefs. r=mattwoodrow
Depends on D44322

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

--HG--
extra : moz-landing-system : lando
2019-09-01 21:37:08 +00:00
Markus Stange
e6da884bfd Bug 1578099 - Add NativeLayer::NextSurfaceAsDrawTarget. r=mattwoodrow
This uses MacIOSurface internally. NextSurfaceAsDrawTarget locks the MacIOSurface,
and NotifySurfaceReady unlocks it if necessary.

Depends on D44321

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

--HG--
extra : moz-landing-system : lando
2019-09-01 23:22:04 +00:00
Markus Stange
975773c0ae Bug 1578099 - Make more NativeLayerCA methods available on NativeLayerCA. r=mattwoodrow
The comments above these methods refer to NextSurface* methods which will be
added in later patches.

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

--HG--
extra : moz-landing-system : lando
2019-09-01 20:54:07 +00:00
Eric Rahm
4cb2415f74 Bug 1577910 - Remove using namespace std from gfx/2d r=nical
Differential Revision: https://phabricator.services.mozilla.com/D44281

--HG--
extra : moz-landing-system : lando
2019-09-01 18:32:06 +00:00
Markus Stange
f08bba7374 Bug 1491456 - Split the window into "compositing tiles" sized to 1024x1024. r=mattwoodrow
The tile size is configurable with the prefs layers.compositing-tiles.width/height.

On macOS, whenever a CALayer is touched, the window server will recomposite the
entire layer to the screen. There is no API to mark parts of a layer as damaged.
So if we want the window server to only redraw a small part of the screen, we
need to only touch small layers. This patch achieves that using tiles; whenever
the compositor needs to redraw an area, all tiles that overlap this area will
be drawn to their layers and the window server will recomposite those layers.

On Intel GPUs, compositing in tiles should also help reduce GPU times if there
are multiple layers of overdraw: The overdraw will have better cache locality.
However, the magnitude of this effect is not known and requires further research.

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

--HG--
extra : moz-landing-system : lando
2019-08-31 16:00:16 +00:00
Markus Stange
8b0020ab7e Bug 1574586 - Create separate NativeLayer objects for opaque and transparent parts of the window, and do one composite each to draw their contents. r=mattwoodrow
This means that when something changes in an opaque layer, the window server
only needs to copy the opaque layer to the screen and can avoid recomputing any
window backgrounds for transparent parts of the window. This can save power,
especially when transparent parts of the window use the macOS vibrancy effect,
which requires the window server to compute a blur and to composite windows
behind our window.

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

--HG--
extra : moz-landing-system : lando
2019-08-31 16:03:42 +00:00
Mihai Alexandru Michis
13b5aea376 Bug 1574745 - Fix bustages on OS X Cross Compiled. a=bustage-fix CLOSED TREE
--HG--
extra : amend_source : 3fcae6bae609b58437fbc1e981dc00b03a3e3432
2019-08-31 05:05:53 +03:00
Markus Stange
6d617acaca Bug 1574745 - Get everything ready for rendering into multiple native layers. r=mattwoodrow
This change breaks the draw-fps overlay when using native layers. I'll try to
fix that in a new bug soon.

The do { } while(0) loop looks a bit odd, but it'll get replaced with a proper
loop in bug 1574586.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 21:52:32 +00:00
Markus Stange
fe46c46820 Bug 1574745 - Reorder layer rendering invocations. r=mattwoodrow
This change groups the work that has to be done per compositing tile.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 19:52:56 +00:00
Markus Stange
2fccca3dcc Bug 1574745 - Maintain a full window render target when rendering to native layers with CompositorOGL. r=mattwoodrow
This makes profiler screenshots and frame recording work again, when native
layers are used. The copying is a bit unfortunate. Maybe we can combine this
copy with the first downscaling step in the future. Or for frame recording,
which doesn't use downscaling, we could readback the layers individually and
reassemble them in CPU memory. But both of those solutions are more complex
than this.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 19:52:40 +00:00
Markus Stange
b2ce563f4b Bug 1574745 - Change BlitFrameBufferToFrameBuffer to take rects instead of sizes. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D43876

--HG--
extra : moz-landing-system : lando
2019-08-31 01:30:53 +00:00
Markus Stange
e9142df968 Bug 1574745 - Move ShouldRecordFrames() from BasicCompositor to Compositor because CompositorOGL will need it. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D43875

--HG--
extra : moz-landing-system : lando
2019-08-30 19:52:15 +00:00
Markus Stange
8490842d2f Bug 1574745 - Calculate mShouldInvalidateWindow at the beginning of the frame. r=mattwoodrow
This is so that we can invalidate all layers when screenshot profiling has
started, and not just the first layer.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 19:52:13 +00:00
Markus Stange
611b0edd41 Bug 1574745 - Add BeginFrameForNativeLayers() and Begin/EndRenderingToNativeLayer. r=mattwoodrow
This will let us render into multiple layers within one compositor frame.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 21:37:55 +00:00
Markus Stange
603b907093 Bug 1574745 - Add BeginFrameForTarget and replace Set/ClearTargetContext. r=mattwoodrow
This removes any *TargetContext methods from the Compositor interface and moves
 mTarget tracking into the compositor implementations.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 19:51:59 +00:00
Markus Stange
5dc3f8c82a Bug 1574745 - Rename BeginFrame to BeginFrameForWindow. r=mattwoodrow
In the end we want to have BeginFrameForWindow, BeginFrameForTarget, and
BeginFrameForNativeLayers, the latter with multiple Begin/EndRenderingToNativeLayer
pairs nested inside.

This is the first step.

CompositorOGL and CompositorD3D11 keep their internal BeginFrame method but make
it private.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 19:51:55 +00:00
Markus Stange
cb05c82010 Bug 1574745 - Make DrawGeometry culling work more reliably. r=mattwoodrow
The call to TransformAndClipBounds already clips destRect to renderBounds.
However, if the resulting rect was empty, the Inflate call would make it
non-empty again. And now the decision whether we would cull would depend on the
rect's position: Sometimes TransformAndClipBounds would place the empty rect at
a position along an edge of renderBounds, and then the inflated-from-nothingness
2x2 rect would overlap renderBounds and we wouldn't cull.

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

--HG--
extra : moz-landing-system : lando
2019-08-30 19:51:45 +00:00
Markus Stange
4bcd4b8795 Bug 1574745 - Respect render target clip during DrawGeometry culling and overdraw pixel counting. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D43869

--HG--
extra : moz-landing-system : lando
2019-08-30 19:51:37 +00:00