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

1994 Коммитов

Автор SHA1 Сообщение Дата
alwu d832456285 Bug 1579127 - only count the frame dropping due to system overload. r=mattwoodrow
When user adjusts the video playback rate, which might cause we sending images in a speed that is faster than the speend we composite images.

In this situation, the frame dropping actually won't cause any visual defect and we also don't want to report this frame dropping to user, because it's not caused by system overloading, it's just our compositor doesn't support compositing images in such a high rate.

Therefore, we should check if the dropped images are caused by system overload or high update rate, and only report the former to user.

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

--HG--
extra : moz-landing-system : lando
2019-10-08 08:06:13 +00:00
Botond Ballo 7b097cc92f Bug 1552608 - Factor out a helper AsyncCompositionManager::ComputeFixedMarginsOffset(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D48376

--HG--
extra : moz-landing-system : lando
2019-10-07 21:52:49 +00:00
Botond Ballo a3395bb518 Bug 1552608 - Use SideBits rather than int32_t to represent fixed-position sides in the Layers API. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D48374

--HG--
extra : moz-landing-system : lando
2019-10-07 21:03:52 +00:00
Botond Ballo 1273d512eb Bug 1552608 - Define AsyncCompositionManager::mFixedLayerMargins and its getter/setter on all platforms. r=tnikkel
It's still only used on Android, but keeping it and all code that interacts
with it inside an #ifdef is too much trouble for a tiny amount of space
saving.

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

--HG--
extra : moz-landing-system : lando
2019-10-07 20:37:09 +00:00
Gurzau Raul 5a1b6187b8 Backed out changeset 348fa5ed7407 (bug 1579127) for image raster crashes on a CLOSED TREE. 2019-10-02 12:38:29 +03:00
alwu 8839b4e88b Bug 1579127 - only count the frame dropping due to system overload. r=mattwoodrow
When user adjusts the video playback rate, which might cause we sending images in a speed that is faster than the speend we composite images.

In this situation, the frame dropping actually won't cause any visual defect and we also don't want to report this frame dropping to user, because it's not caused by system overloading, it's just our compositor doesn't support compositing images in such a high rate.

Therefore, we should check if the dropped images are caused by system overload or high update rate, and only report the former to user.

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

--HG--
extra : moz-landing-system : lando
2019-10-02 01:23:47 +00:00
Botond Ballo 6db92a9d0e Bug 1584691 - Reinstate support for scrollbar layers that are descendants of the scrolled content. r=tnikkel
This layer structure can still occur in cases where we place the RCD-RSF
scroll metadata on the root layer as a fallback.

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

--HG--
extra : moz-landing-system : lando
2019-09-30 19:12:16 +00:00
Martin Stransky d3e64dee66 Bug 1578380 - [Wayland] Use WaylandDMABUF texure backend on Wayland when DMABuf is enabled, r=sotaro
Depends on D46840

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

--HG--
extra : moz-landing-system : lando
2019-09-24 11:06:39 +00:00
Oana Pop Rus a22fdc5e79 Backed out 8 changesets (bug 1578380) for causing build bustages in ContentClient.cpp on a CLOSED TREE
Backed out changeset 28c2e884d20a (bug 1578380)
Backed out changeset 373c4563e9fd (bug 1578380)
Backed out changeset 3fdbc241d63a (bug 1578380)
Backed out changeset 754865b2810f (bug 1578380)
Backed out changeset b80b7e186f02 (bug 1578380)
Backed out changeset 3a8abb5d7a43 (bug 1578380)
Backed out changeset 2b52c3d15b7b (bug 1578380)
Backed out changeset ca57727c3aad (bug 1578380)
2019-09-24 13:06:55 +03:00
Martin Stransky e968a933f9 Bug 1578380 - [Wayland] Use WaylandDMABUF texure backend on Wayland when DMABuf is enabled, r=sotaro
Depends on D46840

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

--HG--
extra : moz-landing-system : lando
2019-09-24 09:10:11 +00:00
Botond Ballo 2641cbd682 Bug 1577859 - Additional post container scrolling removal cleanup in APZ code. r=tnikkel
With container scrolling, layers that are fixed wrt. the RCD-RSF are no
longer descendants of layers with RCD-RSF metadata. This allows us to remove
some code that handles this case in AsyncCompositionManager.

In particular, when ApplyAsyncContentTransformToTree() calls
AlignFixedAndStickyLayers():

  - If we are currently processing a layer with RCD-RSF metadata,
    AlignFixedAndStickyLayers() will not do anything (because there will be
    no descendants fixed wrt. the RCD-RSF), so it doesn't matter what
    transform we pass to AlignFixedAndStickyLayers().

  - If we are processing a different layer, then Metrics().IsRootContent()
    will be false, so GetCurrentAsyncTransformForFixedAdjustment()
    simplifies to just GetCurrentAsyncTransform().

As a result, GetCurrentAsyncTransformForFixedAdjustment() (and its helper
GetCurrentAsyncViewportTransform()) can be removed, and its use replaced
with GetCurrentAsyncTransform().

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

--HG--
extra : moz-landing-system : lando
2019-09-15 23:34:13 +00:00
Botond Ballo f94ae56498 Bug 1577859 - Stop handling scrollbar layers that are descendants of the scrolled content. r=tnikkel
With containerless scrolling, scrollbar layers and their target scrolled layers
will be in sibling subtrees.

Depends on D45596

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

--HG--
extra : moz-landing-system : lando
2019-09-15 21:50:10 +00:00
Botond Ballo 3a1c85bca4 Bug 1577859 - Remove the layout.scroll.root-frame-containers pref and code that depends directly on it. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D45198

--HG--
extra : moz-landing-system : lando
2019-09-15 17:01:22 +00:00
Bob Owen f5e4873899 Bug 1575874: Create the CanvasTranslator on the Compositor thread to prevent race with WaitForSurfaceDescriptor. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D43774

--HG--
extra : moz-landing-system : lando
2019-09-10 02:06:28 +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
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
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 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 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 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 c3ccb5e5ca Bug 1574745 - Prepare CompositorOGL for native layers that are not located at (0, 0). r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D42424

--HG--
extra : moz-landing-system : lando
2019-08-30 19:49:58 +00:00
Markus Stange 05e96272fa Bug 1576499 - Turn aRenderBoundsOut outparam into a Maybe<> return value. r=mattwoodrow
Depends on D43375

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

--HG--
extra : moz-landing-system : lando
2019-08-26 00:58:45 +00:00
Markus Stange b018721497 Bug 1576499 - Rename actualBounds to bounds. r=mattwoodrow
Depends on D43374

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

--HG--
extra : moz-landing-system : lando
2019-08-26 00:58:45 +00:00
Markus Stange 2641a83544 Bug 1576499 - Another random rect simplification. r=mattwoodrow
Depends on D43373

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

--HG--
extra : moz-landing-system : lando
2019-08-26 00:58:44 +00:00
Markus Stange 865a952e99 Bug 1576499 - Turn aClipRectIn into a Maybe and rename it to aClipRect, now that aClipRectOut is gone. r=mattwoodrow
Depends on D43372

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

--HG--
extra : moz-landing-system : lando
2019-08-26 00:58:44 +00:00
Markus Stange eebce2e2ca Bug 1576499 - Combine the two calls to BeginFrame. r=mattwoodrow
Depends on D43371

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

--HG--
extra : moz-landing-system : lando
2019-08-26 00:58:44 +00:00
Markus Stange 0e282ae078 Bug 1576499 - Make clipRect an untyped IntRect. r=mattwoodrow
Depends on D43370

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

--HG--
extra : moz-landing-system : lando
2019-08-26 00:58:44 +00:00
Markus Stange 5381b751be Bug 1576499 - Eliminate bounds variable from LayerManagerComposite::Render. r=mattwoodrow
Depends on D43369

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

--HG--
extra : moz-landing-system : lando
2019-08-26 00:58:43 +00:00
Markus Stange 833a05e47e Bug 1576499 - Remove aClipRectOut parameter from Compositor::BeginFrame(). r=mattwoodrow
Whenever *aRenderBoundsOut was non-empty and aClipRectOut was non-null,
*aClipRectOut was set to the same value as *aRenderBoundsOut.

Depends on D43368

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

--HG--
extra : moz-landing-system : lando
2019-08-26 00:58:43 +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 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 d417bf03ed Bug 1573343 - Use std::any_of to compute hasContentPaint. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D41681

--HG--
extra : moz-landing-system : lando
2019-08-19 22:41:07 +00:00
Markus Stange cd5788b20f Bug 1545262 - Update BasicCompositor's mFullWindowRenderTarget before we capture the screenshot for the current frame. r=mattwoodrow
In the past, mFullWindowRenderTarget was updated in EndFrame, so the captured
screenshots (which were captured before EndFrame) were always one frame behind.
This affected both profiler screenshots and window recording screenshots.

This also fixes a bug with the destination offset in the call to
mFullWindowRenderTarget->mDrawTarget->CopySurface(): In the case where mTarget
was non-null, those calls would use mTargetBounds.TopLeft() as the destination
offset, which is very much unrelated to anything in mFullWindowRenderTarget.
Now the destination offset for mFullWindowRenderTarget is always zero -
mFullWindowRenderTarget->mDrawTarget's device space is the same as window space.

This patch also moves the creation of mFullWindowRenderTarget down to where we
have mRenderTarget->mDrawTarget, so that we can create a DrawTarget of a type
that can efficiently copy from mRenderTarget->mDrawTarget. I think this is
important on Windows where mRenderTarget->mDrawTarget will be the Cairo/pixman
re-wrapped DrawTarget and mDrawTarget is some kind of Windows/GDI DrawTarget.

Depends on D41612

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

--HG--
extra : moz-landing-system : lando
2019-08-14 06:34:24 +00:00
Markus Stange dfad7a59cc Bug 1567319 - Discard payloads for no-op composites. r=bas
Differential Revision: https://phabricator.services.mozilla.com/D40569

--HG--
extra : moz-landing-system : lando
2019-08-15 17:54:17 +00:00
Sylvestre Ledru 645f2d5773 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-08-13 07:15:25 +00:00
Markus Stange ffa12fa4c6 Bug 1571862 - When the layer change region is too complex, always set mInvalidRegion to mRenderBounds, even if we're currently rendering to mTarget. r=mattwoodrow
We only use the result of this calculation for composites to the actual window
(and stash it for later if this composite is to an external target), so
mTargetBounds is always unrelated.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 00:47:05 +00:00