Commit Graph

14110 Commits

Author SHA1 Message Date
Simon Giesecke
aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Martin Stransky
a37d672244 Bug 1617575 [Wayland] Don't pass invalid file descriptors to SurfaceDescriptorDMABuf, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D63850

--HG--
extra : moz-landing-system : lando
2020-02-25 13:48:39 +00:00
Simon Giesecke
32c9aeaad4 Bug 1617542 - Remove nsRefPtrHashtable::Put overload accepting already_AddRefed and adapt all uses. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63865

--HG--
extra : moz-landing-system : lando
2020-02-25 09:36:12 +00:00
Miko Mynttinen
5a00de3d66 Bug 1616422 - Part 2: Update display item cache state after call to CreateWebRenderCommands() r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D63276

--HG--
extra : moz-landing-system : lando
2020-02-25 00:08:19 +00:00
Daniel Varga
b8dccd6369 Backed out 2 changesets (bug 1616422) for causing webrender-lint-tidy failures
CLOSED TREE

Backed out changeset 3d44ebc7aed0 (bug 1616422)
Backed out changeset d17dbf82cdd0 (bug 1616422)
2020-02-25 01:33:21 +02:00
Miko Mynttinen
30b1a8c63f Bug 1616419 - Add nsPaintedDisplayItem::CanBeCached() to allow finer control of when display items can be cached r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D63274

--HG--
extra : moz-landing-system : lando
2020-02-24 23:17:28 +00:00
Miko Mynttinen
2d36bc960e Bug 1616422 - Part 2: Update display item cache state after call to CreateWebRenderCommands() r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D63276

--HG--
extra : moz-landing-system : lando
2020-02-24 23:01:12 +00:00
Kartikaya Gupta
186b239065 Bug 1613199 - Fix hit-testing for scrollframes with hoisted scrollinfos. r=botond
In some cases (such as the case from this bug) the display list contains a
"hoisted" scrollinfo display item, which indicates the presence of a scroller
inside an inactive layer subtree (e.g. a div with certain kinds of filters).
The scrollinfo display item is "hoisted" outside the display list subtree so
that it doesn't get flattened away inside the inactive subtree. That display
item then causes the compositor hit-test regions to updated appropriately so
that APZ knows about the scrollframe inside the flattened content. This in turn
allows APZ to request main-thread scrolling for that scrollframe when input
events are directed to it.

With the WebRender codepath, the information represented by the hoisted
scrollinfo display item was being lost instead of being propagated to the
compositor. This was because the mechanism used for information propagation is
different (WebRender commands vs layers EventRegions). This patch ensures that
the scrollinfo display items also generate appropriate WebRender commands so
that the information is not lost, and WR knows about the scrollframe inside
the flattened content.

The patch includes:
- A code movement in nsGfxScrolllFrame.cpp so that necessary information can
  be provided to the nsDisplayScrollInfoLayer constructor
- Updates to nsDisplayScrollInfoLayer members to store the necessary information
- Addition of nsDisplayScrollInfoLayer::CreateWebRenderCommands which propagates
  the information to the WR display list
- A test to exercise the changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-24 17:26:19 +00:00
Cosmin Sabou
7f1afff492 Backed out 5 changesets (bug 1617604, bug 1617542, bug 1617546) for causing build bustages on ipc/mscom/Interceptor.cpp.
CLOSED TREE

Backed out changeset 5faa54ad950e (bug 1617542)
Backed out changeset cb38779e1eb6 (bug 1617604)
Backed out changeset 3aea18e0396f (bug 1617542)
Backed out changeset bc3eeefdfb6c (bug 1617542)
Backed out changeset b76a3aa5ff6f (bug 1617546)
2020-02-24 19:50:13 +02:00
Simon Giesecke
df538d9a79 Bug 1617542 - Remove nsRefPtrHashtable::Put overload accepting already_AddRefed and adapt all uses. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63865

--HG--
extra : moz-landing-system : lando
2020-02-24 17:08:30 +00:00
Botond Ballo
e78ce55431 Bug 1617317 - Use nsIDOMWindowUtils.screenPixelsPerCSSPixelNoOverride in coordinatesRelativeToScreen(). r=kats
This makes its calculation correct even for content inside RDM.

I don't think coordinatesRelativeToScreen() is currently used inside RDM,
but it might be in the future, and in any case it's good for it to be
conceptually correct.

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

--HG--
extra : moz-landing-system : lando
2020-02-24 16:44:18 +00:00
Kartikaya Gupta
85c3d9e6a5 Bug 1617565 - Convert additional compile-conditional logging bits to MOZ_LOG. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D63868

--HG--
extra : moz-landing-system : lando
2020-02-24 16:31:04 +00:00
Sylvestre Ledru
ca6530131a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan,kvark
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-02-24 15:33:38 +00:00
Martin Stransky
4f58cf3e36 Bug 1617553 [Wayland] Use GL texture format instead of surface one for GL texture source, r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D63836

--HG--
extra : moz-landing-system : lando
2020-02-24 12:12:33 +00:00
Bogdan Tara
3053d61c49 Backed out changeset 8665af6e62a6 (bug 1600793) on jcristau's request CLOSED TREE 2020-02-24 15:49:47 +02:00
sotaro
817e46a3f7 Bug 1617096 - Ensure to allocate RenderTexture by GPUVideoTextureHost r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D63617

--HG--
extra : moz-landing-system : lando
2020-02-24 02:13:18 +00:00
Bob Owen
8a7ad0fa72 Bug 1614635: Keep waiting on the remote canvas writer side while the reader hasn't closed. r=jrmuizel
It seems clear that we can get long delays waiting for Direct2D to process
things on occasion. So given that we now detect when the reader has closed,
instead of guessing at a suitably long timeout, waiting indefintely while it
hasn't closed seems like a better option.
This gives a similar behaviour to when this is just running in the content
process, because that just has to wait on any long running Direct2D calls.

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

--HG--
extra : moz-landing-system : lando
2020-02-24 10:53:48 +00:00
Bob Owen
d8b69b9e00 Bug 1558117 Part 2: Check if other side is closed while state is AboutToWait. r=jrmuizel
If the other side crashed with AboutToWait set in CanvasEventRingBuffer then in
theory we could spin forever waiting for it to change.

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

--HG--
extra : moz-landing-system : lando
2020-02-24 10:53:43 +00:00
Bob Owen
6ff3f77570 Bug 1558117 Part 1: Add logging when we fail to read an event from canvas ring buffer. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D61826

--HG--
extra : moz-landing-system : lando
2020-02-24 11:17:31 +00:00
Bob Owen
7d0ee586b4 Bug 1598585 Part 5: Create a new reference texture on canvas device change. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D61825

--HG--
extra : moz-landing-system : lando
2020-02-24 10:51:50 +00:00
Bob Owen
a8de05ad4d Bug 1598585 Part 4: Notify the content process of a canvas device change. r=jrmuizel
This sends a message to the content process on device reset/change. The content
process clears the CanvasImageCache and canvas TextureClients and then records a
new event, so the translator knows it has finished.

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

--HG--
extra : moz-landing-system : lando
2020-02-24 11:21:27 +00:00
Bob Owen
cad856864a Bug 1598585 Part 3: Detect and handle device reset in CanvasTranslator. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D60889

--HG--
extra : moz-landing-system : lando
2020-02-24 10:50:14 +00:00
Bob Owen
d8ee8af896 Bug 1598585 Part 2: Make playback of Moz2D recorded events more robust. r=jrmuizel
This is generally around object creation failures and their subsequent lookup,
which can happen, for example, during device reset.

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

--HG--
extra : moz-landing-system : lando
2020-02-24 10:49:36 +00:00
Bob Owen
481aab9295 Bug 1598585 Part 1: Make CanvasTranslator the PCanvas parent actor. r=mattwoodrow
We want to be able to send IPC messages from the translation in the parent. So
the simplest thing it move the top level actor parts of CanvasParent into
CanvasTranslator.
This patch also moves the canvas thread management parts out into a new
CanvasThreadHolder class and hopefully makes the lifecycle management of these
much more robust. This includes the use of a TaskQueue per CanvasTranslator to
manage serial processing on the canvas workers, instead of a boolean.

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

--HG--
rename : gfx/layers/ipc/CanvasParent.cpp => gfx/layers/ipc/CanvasThread.cpp
rename : gfx/layers/ipc/CanvasParent.h => gfx/layers/ipc/CanvasThread.h
rename : gfx/layers/CanvasTranslator.cpp => gfx/layers/ipc/CanvasTranslator.cpp
rename : gfx/layers/CanvasTranslator.h => gfx/layers/ipc/CanvasTranslator.h
extra : moz-landing-system : lando
2020-02-24 11:15:41 +00:00
Sean Feng
9b2bb978fc Bug 1600793 - Make the scrolling input telemetry work for WebRender r=botond,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D60046

--HG--
extra : moz-landing-system : lando
2020-02-21 19:41:46 +00:00
Kartikaya Gupta
484f28c86a Bug 1616591 - Migrate APZ logging to use the MOZ_LOG framework. r=botond
The MOZ_LOG framework is the canonical Gecko logging framework, and provides
better control over what gets logged and where it goes, as well as provides
additional options like process/thread/timestamp prefixing of log output. This
patch does the minimum necessary to migrate the logs; each pre-existing
logging define is converted to a log module and all pre-existing log lines are
defaulted to LogLevel::Debug.

In addition, this prevents future breakage in the logging since everything
gets compiled on at least some configurations (e.g. non-Release, non-Android
builds).

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

--HG--
extra : moz-landing-system : lando
2020-02-21 20:00:36 +00:00
Kartikaya Gupta
319ceb2bae Bug 1616591 - Make all the APZ log statements build again if enabled. r=botond
- Some breakage in FocusState/FocusTarget was introduced when the LayersId struct
  was introduced in bug 1448490; printing LayersId type now requires using the
  cast operator to get back the underlying uint64_t.
- Some breakage was introduced in APZCTreeManager by bug 1552608 when it
  introduced the HitTestResult structure.
- Some breakage in SimpleVelocityTracker seems to have been there since it
  landed as it tries to access a protected member in Axis. Added a public
  method to expose this as needed.
- Some breakage in ActiveElementManager was introduced in bug 1266595 when the
  runnable was wrapped in a RefPtr.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 20:00:29 +00:00
Emilio Cobos Álvarez
903ecdfd29 Bug 1584035 - Add a test for this bug. r=botond,kats
Differential Revision: https://phabricator.services.mozilla.com/D62627

--HG--
extra : moz-landing-system : lando
2020-02-21 18:14:37 +00:00
Kris Taeleman
1dca990a55 Bug 1615575 - Fix copy instead of reference of structure causing deletion issues. r=aosmond
The copy instead of reference was causing the LayerTreeState to call its destructor and destroying its controller.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 00:43:53 +00:00
Martin Stransky
f12714395b Bug 1616892 [Wayland] Use VAAPIFrameHolder at release callback, r=sotaro
FFmpeg decoder needs to keep reference to more strucures for each frame so Bug 1616185 implements a VAAPIFrameHolder strucure
and keeps the reference there. Let's use that also in WaylandDMABUFSurfaceImage.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 10:59:17 +00:00
Masayuki Nakano
1110bedb45 Bug 1613830 - Add nsINode::GetAsElementOrParentElement() r=smaug
This patch assumes that only element node can have content node.  I.e., we
won't hit the following `MOZ_ASSERT`:

```
Element* element = nullptr;
nsIContent* content = aContent;
while (content) {
  if (content->IsElement()) {
    element = content->AsElement();
    break;
  }
  content = content->GetParent();
}
MOZ_ASSERT(!content || content == element || content->GetParent() == element);
```

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

--HG--
extra : moz-landing-system : lando
2020-02-21 02:47:05 +00:00
Miko Mynttinen
3e660d9274 Bug 1616335 - Add a pref to dump the serialized WebRender display list r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D63227

--HG--
extra : moz-landing-system : lando
2020-02-21 01:08:10 +00:00
Mike Shal
c8abdd68c2 Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart
Differential Revision: https://phabricator.services.mozilla.com/D63438

--HG--
extra : moz-landing-system : lando
2020-02-21 00:05:17 +00:00
Csoregi Natalia
a15f9174ec Backed out changeset 3a8d5795c985 (bug 1616335) for tidy bustage on display_list.rs. CLOSED TREE 2020-02-21 01:31:33 +02:00
Miko Mynttinen
94dc6ffded Bug 1616335 - Add a pref to dump the serialized WebRender display list r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D63227

--HG--
extra : moz-landing-system : lando
2020-02-20 23:13:13 +00:00
Csoregi Natalia
6360b24e80 Backed out 2 changesets (bug 1616630) for Android bustage. CLOSED TREE
Backed out changeset 15016546c954 (bug 1616630)
Backed out changeset dcb7dc51633b (bug 1616630)
2020-02-20 21:24:11 +02:00
Mike Shal
39492660f4 Bug 1616630 - Use py3_action for GENERATED_FILES that already support it; r=firefox-build-system-reviewers,kvark,rstewart
Depends on D63437

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

--HG--
extra : moz-landing-system : lando
2020-02-20 16:21:55 +00:00
Martin Stransky
2d00d46613 Bug 1616590 [Wayland] Fix GL compositor to composite correctly NV12 textures generated by ffmpeg, r=sotaro
- Enable GL_TEXTURE_RECTANGLE_ARB only when the extension is supported
- Switch Green and Alpha colors in NV12 shader when compositing on Wayland. Is's because vaExportSurfaceHandle() exports UV plane in DRM_FORMAT_GR88 format so we have to use R and G channels and not R and A as we have now.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 14:08:25 +00:00
Simon Giesecke
9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
sotaro
cecac7d080 Bug 1611886 - Add VRManagerParent::Shutdown() r=nical
Differential Revision: https://phabricator.services.mozilla.com/D61144

--HG--
extra : moz-landing-system : lando
2020-02-20 06:46:11 +00:00
Nicolas Silva
8d2152543a Bug 1616592 - Control the batching lookback count via a pref. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D63336

--HG--
extra : moz-landing-system : lando
2020-02-20 03:45:17 +00:00
Dorel Luca
d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke
59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Emilio Cobos Álvarez
d18caaa054 Bug 1616395 - Remove FfiVec. r=jrmuizel
Use ThinVec instead, which is compatible with nsTArray, and makes stuff much
harder to misuse.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:34:51 +00:00
Martin Stransky
905e0e97e8 Bug 1614568 [Wayland] Implement fence sync to dmabuf surfaces for WebGL rendering, r=jgilbert
Use ANDROID_native_fence_sync to synchronize WebGL renderin. It's similar to KHR_fence_sync
but it the fence can be exported to file descriptor and shared among processes so we can create
the fence by WebGL producer and then wait in renderer.

Use glFinish() as a fallback when ANDROID_native_fence_sync is not available.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 15:13:28 +00:00
Mike Shal
d8e4653d19 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 13:22:46 +00:00
sotaro
03286b57aa Bug 1616174 - Do not create unnecessary compositor window r=nical
compositor window is not necessary for BasicCompositor.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 09:39:23 +00:00
Jeff Gilbert
b8111d92ec Bug 1615751 - Prune unused parts of GLScreenBuffer. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D62979

--HG--
extra : moz-landing-system : lando
2020-02-15 22:48:36 +00:00
Arthur Iakab
fa5241b0f1 Backed out changeset 57fa22ef0461 (bug 1615751) for multiple build bustages.
DONTBUILD
CLOSED TREE
2020-02-15 22:19:55 +02:00
Jeff Gilbert
739ec46d60 Bug 1615751 - Prune unused parts of GLScreenBuffer. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D62979

--HG--
extra : moz-landing-system : lando
2020-02-15 04:15:21 +00:00
Mihai Alexandru Michis
2951da7110 Backed out changeset 6550b62f1fe7 (bug 1555356) for causing reftest failures in SVG files.
CLOSED TREE
2020-02-14 23:59:09 +02:00
Olli Pettay
67bc11ab14 Bug 1506376, make DidComposite to use mediumhigh priority message r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D61083

--HG--
extra : moz-landing-system : lando
2020-02-14 16:27:50 +00:00
Bogdan Tara
fa8d9b047d Backed out changeset 80c254f460f5 (bug 1600793) for bustages complaining about webrender_ffi.h CLOSED TREE 2020-02-14 17:54:44 +02:00
Sean Feng
3564b8e803 Bug 1600793 - Make the scrolling input telemetry work for WebRender r=botond,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D60046

--HG--
extra : moz-landing-system : lando
2020-02-14 15:26:35 +00:00
Bogdan Tara
74db09d838 Backed out 3 changesets (bug 1506376) for xpcshell failures CLOSED TREE
Backed out changeset fe7215eefa28 (bug 1506376)
Backed out changeset 621ec02db41c (bug 1506376)
Backed out changeset adbd602610a3 (bug 1506376)
2020-02-14 17:07:49 +02:00
Alexis Beingessner
6b442a22a5 Bug 1555356 - Make images inside of SVGs active. r=aosmond
This is done using a similar approach to CreateWebRenderCommands
but slightly modified. In particular the active layer check needs
to be done before we're ready to CreateWebRenderCommands, but once
we decide to activate an item, we can't let CreateWebRenderCommands
fail. Unfortunately, the need to query ImageLib for support means
we need to do basically ~all of the work of CreateWebRenderCommands
to do this check.

As such, this introduces a modified version of CreateWebRenderCommands
that SVGGeometryFrames implement with a "dry run" flag. When true,
it runs the same code but stops short of mutating the WR DL/state.

ImageLib may be encouraged to do some extra work that could be thrown
away, but I'm not sure there's any way to avoid that.

For now, only SVGImageFrame actually provides an implementation. The
bulk of the implementation is handling the on-by-default
preserveAspectRatio feature of SVG images. It was cleaner to just
reimplement that logic than reuse the existing preserveAspectRatio
code, as it was too tangled up in the particulars of how the PaintSVG
path is designed.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 14:50:36 +00:00
Olli Pettay
6e2d5cc4ae Bug 1506376, make DidComposite to use mediumhigh priority message r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D61083

--HG--
extra : moz-landing-system : lando
2020-02-14 13:54:30 +00:00
Cosmin Sabou
8b4eabd7c2 Merge mozilla-central to autoland. 2020-02-14 15:17:39 +02:00
Cosmin Sabou
ff39f9206d Backed out 2 changesets (bug 1613263, bug 1611326) for presummably causing l10n langpack bustages. a=backout
Backed out changeset 77e54e76848a (bug 1611326)
Backed out changeset 36ba18ac3a68 (bug 1613263)
2020-02-14 15:02:21 +02:00
Mike Shal
ad0c283ab2 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 23:07:04 +00:00
Brindusan Cristian
e2fb6b8344 Backed out changeset 7fefed11f117 (bug 1611326) for build bustages at update-1.xpi.stub. CLOSED TREE 2020-02-13 23:33:34 +02:00
Brindusan Cristian
73ca873fdb Backed out changeset 3a8a36e50541 (bug 1555356) for reftest failures at pattern-big-image.html. CLOSED TREE 2020-02-13 23:16:11 +02:00
Mike Shal
e6464dd404 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 20:31:50 +00:00
Alexis Beingessner
33d729a0f1 Bug 1555356 - Make images inside of SVGs active. r=aosmond
This is done using a similar approach to CreateWebRenderCommands
but slightly modified. In particular the active layer check needs
to be done before we're ready to CreateWebRenderCommands, but once
we decide to activate an item, we can't let CreateWebRenderCommands
fail. Unfortunately, the need to query ImageLib for support means
we need to do basically ~all of the work of CreateWebRenderCommands
to do this check.

As such, this introduces a modified version of CreateWebRenderCommands
that SVGGeometryFrames implement with a "dry run" flag. When true,
it runs the same code but stops short of mutating the WR DL/state.

ImageLib may be encouraged to do some extra work that could be thrown
away, but I'm not sure there's any way to avoid that.

For now, only SVGImageFrame actually provides an implementation. The
bulk of the implementation is handling the on-by-default
preserveAspectRatio feature of SVG images. It was cleaner to just
reimplement that logic than reuse the existing preserveAspectRatio
code, as it was too tangled up in the particulars of how the PaintSVG
path is designed.

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

--HG--
extra : moz-landing-system : lando
2020-02-13 18:39:27 +00:00
Simon Giesecke
b50347f917 Bug 1611415 - Prefer using std::move over forget. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-13 14:38:48 +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
Martin Stransky
0c0169aabe Bug 1613364 [Wayland] Update gfx code to derived WaylandDMABufSurfaceRGBA class, r=sotaro
WaylandDMABufSurface/WaylandDMABufSurfaceRGBA uses textures interface instead of EGLImages so we need
to update gfx code accordingly:

- rename CreateEGLImage() -> CreateTexture()
- rename ReleaseEGLImage() -> ReleaseTextures()
- rename GetGLTexture() -> GetTexture()
- rename WaylandDMABufSurface::CreateDMABufSurface() to WaylandDMABufSurfaceRGBA::CreateDMABufSurface()

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

--HG--
extra : moz-landing-system : lando
2020-02-12 22:35:02 +00:00
Martin Stransky
5cef4a77a7 Bug 1613364 [Wayland] Update WaylandDMABUFTextureHostOGL and WaylandDMABUFTextureClientOGL to work with NV12 format, r=sotaro
- Update WaylandDMABUFTextureClientOGL to work with WaylandDMABufSurfaceRGBA which is used for GL/WebRender compositor
  with dmabuf texture backend.
- Update WaylandDMABUFTextureHostOGL to work with both RGBA and NV12 surface formats.
- Use GLTextureSource instead of EGLImageTextureSource as we need to store more than one texture there with NV12
  and pass the textures there by CreateTextureSourceForPlane().
- Implement NV12 related function by WaylandDMABUFTextureHostOGL (color space, color range, sub-textures num).
- Add NV12 implementation to PushResourceUpdates()/PushDisplayItems() for WebRender.

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

--HG--
extra : moz-landing-system : lando
2020-02-12 22:34:59 +00:00
Martin Stransky
66d3858441 Bug 1613364 [Wayland] Update SurfaceDescriptorDMABuf to export YUV surfaces, r=sotaro
We need to export more planes in SurfaceDescriptorDMABuf and also YUV color space.

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

--HG--
extra : moz-landing-system : lando
2020-02-12 22:34:20 +00:00
shindli
91aa0518dd Backed out changeset 0c982bc69cb3 (bug 1611415) for causing build bustages in /builds/worker/workspace/build/src/obj-firefox/dist/include/nsCOMPtr CLOSED TREE 2020-02-12 20:13:29 +02:00
Simon Giesecke
f604a47fa5 Bug 1611415 - Applied FixItHints from mozilla-non-std-move. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D60980

--HG--
extra : moz-landing-system : lando
2020-02-12 17:24:41 +00:00
Timothy Nikkel
96274c2281 Bug 1614232. Make sure to call RenderMaskLayers in ClientRefLayer::RenderLayer. r=mattwoodrow
ClientReadbackLayer::RenderLayer is the only other RenderLayer implementation that doesn't have a RenderMaskLayers calls, does it need it?

Depends on D62180

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

--HG--
extra : moz-landing-system : lando
2020-02-11 19:00:59 +00:00
Glenn Watson
31585fc1e6 Bug 1608717 - Support per-tile clip (valid) region for native compositor implementations. r=sotaro,mstange
For Draw (non-native) and CA modes, we include the per-tile
valid rect in the clip rect from the surface.

For DC (non-virtual) mode, a per-tile clip rect is set on the
visual for each tile, separate from the overall clip rect that
is set on the surface visual.

For DC (virtual) mode, the Trim API is used to remove pixels
in the virtual tile area that are outside the valid / clipped
region.

Note: Although the valid rect is now applied in the native
compositors, it's currently only based on the overall picture
cache bounding rect. Thus, with this patch there isn't any
noticeable performance improvement. Once this lands and is
working correctly, the follow up patch to calculate a smaller
valid region per-tile is a small amount of work.

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

--HG--
extra : moz-landing-system : lando
2020-02-12 04:27:15 +00:00
Timothy Nikkel
f4658e4672 Bug 1613143. Don't allow an empty transaction to succeed with webrender if we haven't sent a display list to the parent. r=mattwoodrow
I think this probably only shows up with fission oop iframes, tabs probably avoid this path.

The problem occurs when we reconstruct the containing iframe for a style change, we briefly hide the child document, clearing the display list on the parent via ClearCachedResources. Then show it again, we attempt an empty transaction and this succeeds because there is nothing to stop it. (The non-wr case fails because the layer contents are missing and that causes the empty transaction to fail.)

So keep track if we have sent a display list to the parent to allow/disallow an empty transaction.

This fixes a couple webrender+fission reftest failures but it's also a general rendering bug in webrender+fission reproducible in a regular browser.

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

--HG--
extra : moz-landing-system : lando
2020-02-12 01:40:51 +00:00
Ciure Andrei
410dc434d0 Backed out changeset d46cb79a9b55 (bug 1613143)for causing reftest fission failures CLOSED TREE 2020-02-12 03:20:15 +02:00
Timothy Nikkel
68c2b57363 Bug 1613143. Don't allow an empty transaction to succeed with webrender if we haven't sent a display list to the parent. r=mattwoodrow
I think this probably only shows up with fission oop iframes, tabs probably avoid this path.

The problem occurs when we reconstruct the containing iframe for a style change, we briefly hide the child document, clearing the display list on the parent via ClearCachedResources. Then show it again, we attempt an empty transaction and this succeeds because there is nothing to stop it. (The non-wr case fails because the layer contents are missing and that causes the empty transaction to fail.)

So keep track if we have sent a display list to the parent to allow/disallow an empty transaction.

This fixes a couple webrender+fission reftest failures but it's also a general rendering bug in webrender+fission reproducible in a regular browser.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 19:01:30 +00:00
Brindusan Cristian
615e78b5fc Backed out changeset a91870b97f09 (bug 1611886) for xpcshell failures at test_browserid_identity.js. CLOSED TREE 2020-02-11 09:03:03 +02:00
Hiroyuki Ikezoe
1c0f15006d Bug 1599795 - Rename BrowserChild::GetRemoteDocumentRect to GetTopLevelViewportVisibleRectInBrowserCoords. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D62183

--HG--
extra : moz-landing-system : lando
2020-02-11 03:35:56 +00:00
Hiroyuki Ikezoe
d4fa8f4fad Bug 1599795 - Change the remote document rect to size in gfx. r=emilio
What we really needed in the first place was the size not the rect.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 03:57:14 +00:00
sotaro
c3615f343f Bug 1611886 - Add VRManagerParent::Shutdown() r=nical
Differential Revision: https://phabricator.services.mozilla.com/D61144

--HG--
extra : moz-landing-system : lando
2020-02-05 09:42:37 +00:00
sotaro
b23e6dbb81 Bug 1554610 - Destroy CompositorWindow if BasicCompositor is used r=nical
When BasicCompositor is used, BasicCompositor does not use CompositorWindow.

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

--HG--
extra : moz-landing-system : lando
2020-02-04 09:07:57 +00:00
Mihai Alexandru Michis
0044ed8301 Backed out changeset 85ffb2302070 (bug 1600793) for causing crashes regarding DeadlockDetector
CLOSED TREE
2020-02-10 22:41:38 +02:00
Sean Feng
7c81402e17 Bug 1600793 - Make the scrolling input telemetry work for WebRender r=botond,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D60046

--HG--
extra : moz-landing-system : lando
2020-02-10 17:41:45 +00:00
Botond Ballo
5a714b45fa Bug 1612750 - Use the main thread's visual viewport offset as the fallback scroll offset when APZ is force-disabled. r=tnikkel
This ensures that even if APZ is force-disabled, the permanent offset between
the visual and layout viewports is preserved during rendering.

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

--HG--
extra : moz-landing-system : lando
2020-02-10 15:20:08 +00:00
Botond Ballo
659489f090 Bug 1612750 - Move handling of IsApzForceDisabled() into the GetEffective*() functions where possible. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D62091

--HG--
extra : moz-landing-system : lando
2020-02-10 15:19:29 +00:00
Botond Ballo
9d2b7b80cb Bug 1612750 - Simplify a misleading calculation in AsyncPanZoomController::GetCurrentAsyncTransform(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D62090

--HG--
extra : moz-landing-system : lando
2020-02-10 15:19:16 +00:00
Jamie Nicol
ec3f3be37b Bug 1613144 - Ensure async scroll offset is in correct coordinate space whilst async zooming. r=botond
Bug 1609002 made it so that the async scroll offset sent to webrender
is taken from only the layout component of the async transform, rather
than the combined layout and visual components. The consequence of
this is that the layout-only transform is in LayerPixel space (and
unnaffected by the async zoom) rather than ParentLayerPixel
space (which is affected by async zoom).

To convert the value to LayoutDevicePixel space, as webrender expects,
we were dividing by the pinch zoom scale, which includes the async
zoom. This was causing content to jump around whilst async panning and
zooming, as the scroll offset was incorrectly scaled. This is fixed
by instead dividing by the cumulative resolution, which does not
include the async zoom.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 20:45:31 +00:00
shindli
441a09145b Backed out 2 changesets (bug 1613144) for causing reftest failures CLOSED TREE
Backed out changeset 8124309e0bbe (bug 1613144)
Backed out changeset d5d9bf5b8d20 (bug 1613144)
2020-02-07 22:36:52 +02:00
Jamie Nicol
0a3b925a51 Bug 1613144 - Ensure async scroll offset is in correct coordinate space whilst async zooming. r=botond
Bug 1609002 made it so that the async scroll offset sent to webrender
is taken from only the layout component of the async transform, rather
than the combined layout and visual components. The consequence of
this is that the layout-only transform is in LayerPixel space (and
unnaffected by the async zoom) rather than ParentLayerPixel
space (which is affected by async zoom).

To convert the value to LayoutDevicePixel space, as webrender expects,
we were dividing by the pinch zoom scale, which includes the async
zoom. This was causing content to jump around whilst async panning and
zooming, as the scroll offset was incorrectly scaled. This is fixed
by instead dividing by the cumulative resolution, which does not
include the async zoom.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 13:43:23 +00:00
Emilio Cobos Álvarez
61d0c10572 Bug 1613490 - Cleanup usage of ReferenceBox. r=miko
To avoid computing transform bounds over and over. It is generally just better.

Replace the various "overridebounds" thingies by using the "fallback" of the
transform-reference-box code which we need anyway.

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

--HG--
extra : moz-landing-system : lando
2020-02-07 13:34:42 +00:00
Marco Castelluccio
74dcb8afb2 Bug 1613514 - Disable gfx/layers/apz/test/mochitest/browser_test_group_fission.js on Linux coverage builds as it consistently times out. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D61993

--HG--
extra : moz-landing-system : lando
2020-02-07 11:13:46 +00:00
Emilio Cobos Álvarez
dacbb30683 Bug 1613349 - Address one review comment I missed.
Differential Revision: https://phabricator.services.mozilla.com/D61841

--HG--
extra : moz-landing-system : lando
2020-02-06 16:11:34 +00:00
Martin Stransky
7e18aeed6a Bug 1613358 [Wayland] Implement WaylandDMABUFSurfaceImage dmabuf image, r=sotaro
Implement WaylandDMABUFSurfaceImage which is backed by dma buf memory on Wayland and it holds
decoded video images produced by ffmpeg va-api decoder.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 15:15:02 +00:00
Emilio Cobos Álvarez
c5c0ef9787 Bug 1613349 - Rename nsIFrame::DeleteProperty to RemoveProperty. r=dholbert
As it doesn't necessarily call delete and that may be confusing.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 16:06:49 +00:00
Emilio Cobos Álvarez
bf6256b1fc Bug 1613349 - Make nsIFrame::TakeProperty MOZ_MUST_USE. r=dholbert
Depends on D61756

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

--HG--
extra : moz-landing-system : lando
2020-02-06 00:39:10 +00:00
Brindusan Cristian
443b32771a Backed out changeset 6381c1f2aedc (bug 1613358) for build bustages at GLBlitHelper.cpp. CLOSED TREE 2020-02-06 16:15:27 +02:00
Martin Stransky
f6d5f48d74 Bug 1613358 [Wayland] Implement WaylandDMABUFSurfaceImage dmabuf image, r=sotaro
Implement WaylandDMABUFSurfaceImage which is backed by dma buf memory on Wayland and it holds
decoded video images produced by ffmpeg va-api decoder.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 12:10:57 +00:00
Andrew Osmond
52c022a178 Bug 1612589 - Improve image memory reporting even further. r=tnikkel
This patch adds reporting the surface types used by the image frame in a
bit mask (such if it is a CAPTURE including a DATA_SHARED, the mask will
be 1 << CAPTURE | 1 << DATA_SHARED), as well as an estimated size
included in the report as decoded-unknown for when we do not know if the
surface is on the heap or the non-heap specifically. This is the default
implementation for a SourceSurface as well, so we should no longer have
the case where surfaces appear empty despite being in the cache. It also
makes requests being validated as always notable for reporting purposes.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 22:22:13 +00:00
sotaro
aa001195aa Bug 1612665 - Backout Bug 1596630 r=nical
SyncObjectD3D11Host::Synchronize() calling in RenderCompositorANGLE::BeginFrame() is still necessary for D3D11DXVA2Manager::CopyToImage(). Then backout Bug 1596630.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 09:39:28 +00:00
Nicolas Silva
4269e36963 Bug 1613167 - Enable/Disable rayon in WebRender via pref. r=gw
We need a way to switch it on and off to compare the performance and power usage of various test cases.
The new pref is "webrender.enable-multithreading" and does not require a restart.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 09:51:14 +00:00
Martin Stransky
c8f1770150 Bug 1613052 [Wayland] Don't release textures at WaylandDMABUFTextureHostOGL as they're owned by texture source, r=sotaro
Depends on D61547

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

--HG--
extra : moz-landing-system : lando
2020-02-05 08:31:08 +00:00
Martin Stransky
849ffb22b3 Bug 1586696 [Wayland] Use wayland dmabuf as WebGL backend, r=jgilbert
- Create new SharedSurfaceType called EGLSurfaceDMABUF
- Implement EGLSurfaceDMABUF by SharedSurfaceDMABUF which is backed by WaylandDMABufSurface.
  It can be used by Wayland/EGL WebGL backend.
- It's disabled by default, can be enabled by widget.wayland_dmabuf_webgl.enabled pref.

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

--HG--
extra : moz-landing-system : lando
2020-02-05 06:32:25 +00:00
Markus Stange
19bbc2e73c Bug 1607777 - Clear areas that CARenderer repaints, so that old content doesn't accomulate in transparent areas such as the tab bar. r=jrmuizel
I consider this to be a bug in CARenderer. According to https://stackoverflow.com/questions/56150363/rendering-animated-calayer-off-screen-using-carenderer-with-mtltexture the Metal implementation has the same bug.

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

--HG--
extra : moz-landing-system : lando
2020-01-29 12:48:03 +00:00
Markus Stange
0a370169dc Bug 1607777 - Fix CARenderer invalidation when the buffer size changes. r=jrmuizel
addUpdateRect needs to be called after beginFrame, otherwise it doesn't do anything.

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

--HG--
extra : moz-landing-system : lando
2020-01-29 12:47:22 +00:00
Markus Stange
40367ae22a Bug 1607777 - When using CARenderer on HiDPI, pass device pixels to the glOrtho call and use a sublayerTransform on the root CALayer. r=jrmuizel
The CARenderer documentation does not provide any guidance on how to use CARenderer with different resolutions.
In the initial implementation I simply tried the following: Make a device-pixel sized framebuffer, call glViewport with the device pixel size, and then call glOrtho with the "point" size. And this seemed to work.
However, it doesn't always work. When hooking up profiler screenshots, I noticed that in some cases, some layers would just not be rendered. Sometimes I even saw layers show up in wrong places.
After this patch, these problems no longer appear.

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

--HG--
extra : moz-landing-system : lando
2020-01-29 12:46:44 +00:00
Jamie Nicol
dcf72a8a69 Bug 1569339 - Handle position: sticky correctly in webrender whilst zoomed. r=botond
Webrender positions sticky items relative to the viewport rect set on
their ancestor scroll frame, which it expects to be in local
space. The viewport should be set to what gecko calls the scroll
frame's "scroll port" (relative to its reference frame).

Previously we were setting this to be `composition bounds /
resolution`, which gives the correct results at the initial zoom
level, but causes sticky items to jump around when the zoom
changes. This occurs because the composition bounds of the RCD-RSF do
not change as the zoom changes, and instead remain equal to the
widget's size.

The layout viewport remains at the correct size when zoomed, but
unfortunately doesn't have the correct origin. And FrameMetrics does
not provide the constant "initial zoom" value we require to obtain the
desired viewport rect from the composition bounds. To fix this we
therefore must query the scroll port and offset directly from the
scrollable frame, meaning the value remains correct even as the zoom
changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-04 16:40:48 +00:00
Oana Pop Rus
bc5a36afbd Backed out changeset e9ec1b50f99a (bug 1506376) for devtools multiple failures in browser_animation_keyframes-graph_special-colors.js 2020-02-04 03:43:28 +02:00
Olli Pettay
3cae7adb8a Bug 1506376, make DidComposite to use mediumhigh priority message r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D61083

--HG--
extra : moz-landing-system : lando
2020-02-03 21:00:01 +00:00
Jamie Nicol
e0d0ac8af5 Bug 1610952 - Ensure webrender's async scroll offsets are in correct coordinate space. r=botond
For zoomable APZCs, we were correctly dividing the scroll offset by
the pinch zoom scale. This is effectively equal to multiplying by the
device pixel ratio then dividing by the zoom, converting the offset
from parent layer space to layout device space.

However, for non-zoomable APZCs, we were incorrectly assuming that the
pinch zoom scale equalled 1.0. This was causing us to send incorrectly
scaled async scroll offsets to webrender, resulting in content moving
too slowly or quickly whilst asynchronously panning, then suddenly
jumping as the synchronous scroll offset caught up.

This is fixed by ensuring we always divide the asynchronous scroll
offset by the pinch zoom scale, regardless of whether the APZC is
zoomable or not.

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

--HG--
extra : moz-landing-system : lando
2020-01-31 08:52:11 +00:00
Dorel Luca
983a71b2a4 Backed out changeset 9dc9deb3ba3b (bug 1611660) for Reftest failure in layout/reftests/bugs/605138-1.html == layout/reftests/bugs/605138-1-ref.html 2020-01-31 01:44:08 +02:00
Kousuke Takaki
04bba6950f Bug 1602088 - Move nsIScrollableFrame::ScrollUnit to namespace scope. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D61140

--HG--
extra : source : 69fded25adc2ac25e302b49c1128f8926e1311a3
2020-01-30 09:13:19 +00:00
Cosmin Sabou
5a3d320cd0 Backed out changeset 69fded25adc2 (bug 1602088) for causing several box-shadow reftest failures.
CLOSED TREE
2020-01-30 13:23:10 +02:00
Greg V
2befd54d63 Bug 1484812 - Use SwapBuffersWithDamage on EGL platforms (Wayland/Android) r=jnicol,mstange,jgilbert
EGL_KHR_swap_buffers_with_damage (or EGL_EXT_swap_buffers_with_damage)
is an EGL extension that allows the application to inform the display
server (system compositor) which areas of the window have changed.

This commit implements support for that extension in the layers compositor.
The layers compositor always renders the whole frame, so we're only getting
the benefit of not redrawing unchanged areas *in the system compositor*,
not actually doing partial invalidation/compositing,
but that makes the implementation simpler (no need to track buffer age).

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

--HG--
extra : moz-landing-system : lando
2020-01-30 10:46:54 +00:00
Botond Ballo
f62b4f716b Bug 1611660 - Accept layout viewport updates from the main thread right away. r=tnikkel
Previously, we would wait until the following frame (for uncertain reasons
that date back to B2G), but this meant the layout and visual viewports would
be out of sync for a frame, causing APZ to misbehave.

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

--HG--
extra : moz-landing-system : lando
2020-01-30 10:48:34 +00:00
Kousuke Takaki
9681569b70 Bug 1602088 - Move nsIScrollableFrame::ScrollUnit to namespace scope. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D61140

--HG--
extra : moz-landing-system : lando
2020-01-30 09:13:19 +00:00
sotaro
9fbc3e628e Bug 1605777 - Clear WrappingTextureSourceYCbCrBasic::mTexture correctly r=nical
Differential Revision: https://phabricator.services.mozilla.com/D60639

--HG--
extra : moz-landing-system : lando
2020-01-23 11:11:46 +00:00
Miko Mynttinen
fba2799f7a Bug 1558926 - Part 2: Use DisplayItemCache in WebRenderCommandBuilder
Differential Revision: https://phabricator.services.mozilla.com/D60756

--HG--
extra : moz-landing-system : lando
2020-01-27 14:18:17 +00:00
Miko Mynttinen
5c231763e7 Bug 1558926 - Part 1: Add data structures and pref for display item caching r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D50221

--HG--
extra : moz-landing-system : lando
2020-01-27 14:17:43 +00:00
Hiroyuki Ikezoe
677e8ea65a Bug 1594451 - Apply fixed margin offset for position sticky layers/nodes depending on where it's stuck to. r=botond
We currenly only support the dynamic toolbar at bottom, so we apply the
`fixed margin offset` only if the sticky element is stuck at the bottom
of the root scroll container.

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

--HG--
extra : moz-landing-system : lando
2020-01-25 11:00:08 +00:00
Hiroyuki Ikezoe
5d9fe8f9ea Bug 1594451 - Propagate sticky position info to HitTestingNode. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D60065

--HG--
extra : moz-landing-system : lando
2020-01-25 10:25:16 +00:00
Botond Ballo
7ce6d46176 Bug 1611523 - Use the current layers id to simplify IsFixedToRootContent(). r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D61016

--HG--
extra : moz-landing-system : lando
2020-01-25 00:23:44 +00:00
Botond Ballo
a20a5d30fe Bug 1611523 - Track the current layers id during the layer tree traversal in AsyncCompositionManager::ApplyAsyncContentTransformToTree(). r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D61015

--HG--
extra : moz-landing-system : lando
2020-01-25 00:23:34 +00:00
Brindusan Cristian
5ca7181fab Backed out 5 changesets (bug 1558926) for WebRender build bustages. CLOSED TREE
Backed out changeset 974bcab6b1bf (bug 1558926)
Backed out changeset 1865e6d29dcf (bug 1558926)
Backed out changeset 92b415dac733 (bug 1558926)
Backed out changeset 30481c41873a (bug 1558926)
Backed out changeset a4d9a1af297a (bug 1558926)
2020-01-24 20:42:16 +02:00
Miko Mynttinen
7a53d2c64c Bug 1558926 - Part 2: Use DisplayItemCache in WebRenderCommandBuilder
Depends on D50221

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

--HG--
extra : moz-landing-system : lando
2020-01-22 22:41:06 +00:00
Miko Mynttinen
e9f5497f95 Bug 1558926 - Part 1: Add data structures and pref for display item caching r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D50221

--HG--
extra : moz-landing-system : lando
2020-01-22 22:17:18 +00:00
sotaro
56b30bd8c4 Bug 1602643 - Disable WebRender compositor dinamically for async screenshot r=gw
Differential Revision: https://phabricator.services.mozilla.com/D59658

--HG--
extra : moz-landing-system : lando
2020-01-23 23:52:05 +00:00
Mihai Alexandru Michis
d8a8849254 Backed out changeset f3b490c076d6 (bug 1602643) for causing bustages regarding CompositorKindChanged
CLOSED TREE
2020-01-23 16:27:33 +02:00
sotaro
7afb826ef9 Bug 1602643 - Disable WebRender compositor dinamically for async screenshot r=gw
Differential Revision: https://phabricator.services.mozilla.com/D59658

--HG--
extra : moz-landing-system : lando
2020-01-23 04:37:28 +00:00
Bob Owen
78557e5083 Bug 1604800 Part 1: Add a new WRAP_AND_RECORD SurfaceType for SourceSurfaceWrapAndRecord. r=jrmuizel
This is to avoid type confusion with SourceSurfaceRecording.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 21:21:08 +00:00
Boris Chiou
98e40ec294 Bug 1592822 - Replace StyleVecU8 with ipc::ByteBuf. r=emilio
We generate ByteBuf by rust bindgen, so we can drop StyleVecU8.
One potential follow-up is that we can merge this together with WrVecU8.

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

--HG--
rename : ipc/glue/ByteBuf.h => ipc/glue/ByteBufUtils.h
extra : moz-landing-system : lando
2020-01-22 20:18:40 +00:00
Boris Chiou
ffa1ebad7b Bug 1592822 - Use Serde for OffsetRotate and PositionOrAuto. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60088

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:38 +00:00
Boris Chiou
14387265a7 Bug 1592822 - Use Serde for SVGOffsetPath. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60087

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:35 +00:00
Boris Chiou
38cc52c091 Bug 1592822 - Use Serde for Transform. r=emilio
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 20:20:38 +00:00
Boris Chiou
7b90a66fcb Bug 1592822 - Use Serde for rotate, scale, and translate properties. r=emilio
The only drawback is: we resolve LengthPercentage value before passing
translate property through IPC, so its percentage part is redundant.
However, this makes us easier to maintain the Rust type.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:31 +00:00
Boris Chiou
f3dc7fa3c7 Bug 1592822 - Use macro for the implementation of ParamTraits<> on types which support Serde. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60610

--HG--
extra : moz-landing-system : lando
2020-01-22 20:18:24 +00:00
Bogdan Tara
958c34b738 Backed out 6 changesets (bug 1592822) for bustages complaining about layout/painting/nsDisplayList.cpp CLOSED TREE
Backed out changeset 90d0f2ebd310 (bug 1592822)
Backed out changeset 9890bad86a0e (bug 1592822)
Backed out changeset 43870cc90433 (bug 1592822)
Backed out changeset d80e0e3f5b87 (bug 1592822)
Backed out changeset 99be49183325 (bug 1592822)
Backed out changeset 9ce641556acc (bug 1592822)

--HG--
extra : histedit_source : fa4e4b2c899510f1d39ee3baa0374e2ce16d2815
2020-01-22 21:17:39 +02:00
Boris Chiou
4f3076794c Bug 1592822 - Replace StyleVecU8 with ipc::ByteBuf. r=emilio
We generate ByteBuf by rust bindgen, so we can drop StyleVecU8.
One potential follow-up is that we can merge this together with WrVecU8.

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

--HG--
rename : ipc/glue/ByteBuf.h => ipc/glue/ByteBufUtils.h
extra : moz-landing-system : lando
2020-01-22 18:42:54 +00:00
Boris Chiou
e10013895e Bug 1592822 - Use Serde for OffsetRotate and PositionOrAuto. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60088

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:19 +00:00
Boris Chiou
40f3cb3d65 Bug 1592822 - Use Serde for SVGOffsetPath. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60087

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:11 +00:00
Boris Chiou
9735c2e972 Bug 1592822 - Use Serde for Transform. r=emilio
Though this may make us use more space when serializing
StyleTransform, but we don't have to do extra conversion on the compostior
side, and this makes us easier to maintain the Rust type.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:09 +00:00
Boris Chiou
73f0ae66a9 Bug 1592822 - Use Serde for rotate, scale, and translate properties. r=emilio
The only drawback is: we resolve LengthPercentage value before passing
translate property through IPC, so its percentage part is redundant.
However, this makes us easier to maintain the Rust type.

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

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:07 +00:00
Boris Chiou
c3faeb70ea Bug 1592822 - Use macro for the implementation of ParamTraits<> on types which support Serde. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D60610

--HG--
extra : moz-landing-system : lando
2020-01-22 18:40:05 +00:00
Aaron Klotz
9847ab1f71 Bug 1610878: Remove using namespace mozilla::java directive from AndroidAPZ.cpp; r=botond
Differential Revision: https://phabricator.services.mozilla.com/D60709

--HG--
extra : moz-landing-system : lando
2020-01-22 17:45:13 +00:00
Sylvestre Ledru
187e9bafaf Bug 1519636 - Automatically reformat recent changes using clang-format r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-21 09:51:27 +00:00
Makoto Kato
a94e918a29 Bug 1574307 - Part 1. Parse viewport-fit in meta element. r=smaug
For safe area insets (cutout) support, CSS Round Display Level 1 (https://drafts.csswg.org/css-round-display/#viewport-fit-descriptor) has new viewport value as `viewport-fit`.

To support safe area insets that is notch on display, CSS Environment Variables Module Level 1 (https://drafts.csswg.org/css-env-1/#safe-area-insets) adds `safearea-insets-*` (left, top, right and bottom). Also, `meta` element has `viewport-fit` enum value. (ex `<meta name="viewport" content="viewport-fit=cover>`) whether web browser window cover notch area.

`viewport-fit` has 3 enum value, `auto`, `cover` and `contain`.  GeckoView wants to expose this value to browser application such Fenix. Because Android API (https://developer.android.com/guide/topics/display-cutout) uses window root layout (It is set by Application) to cover notch on display.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 08:40:05 +00:00
Eric Rahm
cfd1cc461f Bug 1610388 - Remove nsAutoPtr usage from gfx/. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D60456

--HG--
extra : moz-landing-system : lando
2020-01-21 01:25:28 +00:00
Emilio Cobos Álvarez
256c124f94 Bug 1609996 - Reorder some includes affected by the previous patches. r=froydnj
This was done by:

This was done by applying:

```
diff --git a/python/mozbuild/mozbuild/code-analysis/mach_commands.py b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
index 789affde7bbf..fe33c4c7d4d1 100644
--- a/python/mozbuild/mozbuild/code-analysis/mach_commands.py
+++ b/python/mozbuild/mozbuild/code-analysis/mach_commands.py
@@ -2007,7 +2007,7 @@ class StaticAnalysis(MachCommandBase):
         from subprocess import Popen, PIPE, check_output, CalledProcessError

         diff_process = Popen(self._get_clang_format_diff_command(commit), stdout=PIPE)
-        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format]
+        args = [sys.executable, clang_format_diff, "-p1", "-binary=%s" % clang_format, '-sort-includes']

         if not output_file:
             args.append("-i")
```

Then running `./mach clang-format -c <commit-hash>`

Then undoing that patch.

Then running check_spidermonkey_style.py --fixup

Then running `./mach clang-format`

I had to fix four things:

 * I needed to move <utility> back down in GuardObjects.h because I was hitting
   obscure problems with our system include wrappers like this:

0:03.94 /usr/include/stdlib.h:550:14: error: exception specification in declaration does not match previous declaration
0:03.94 extern void *realloc (void *__ptr, size_t __size)
0:03.94              ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/malloc_decls.h:53:1: note: previous declaration is here
0:03.94 MALLOC_DECL(realloc, void*, void*, size_t)
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozilla/mozalloc.h:22:32: note: expanded from macro 'MALLOC_DECL'
0:03.94     MOZ_MEMORY_API return_type name##_impl(__VA_ARGS__);
0:03.94                                ^
0:03.94 <scratch space>:178:1: note: expanded from here
0:03.94 realloc_impl
0:03.94 ^
0:03.94 /home/emilio/src/moz/gecko-2/obj-debug/dist/include/mozmemory_wrap.h:142:41: note: expanded from macro 'realloc_impl'
0:03.94 #define realloc_impl mozmem_malloc_impl(realloc)

   Which I really didn't feel like digging into.

 * I had to restore the order of TrustOverrideUtils.h and related files in nss
   because the .inc files depend on TrustOverrideUtils.h being included earlier.

 * I had to add a missing include to RollingNumber.h

 * Also had to partially restore include order in JsepSessionImpl.cpp to avoid
   some -WError issues due to some static inline functions being defined in a
   header but not used in the rest of the compilation unit.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:19:48 +00:00
Emilio Cobos Álvarez
aa3a695712 Bug 1609996 - Remove mozilla/Move.h. r=froydnj
rg -l 'mozilla/Move.h' | xargs sed -i 's/#include "mozilla\/Move.h"/#include <utility>/g'

Further manual fixups and cleanups to the include order incoming.

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:18:20 +00:00
Emilio Cobos Álvarez
5cd5e6f148 Bug 1609996 - Remove mozilla::Swap in favor of std::swap. r=froydnj
Now mfbt/Move.h is empty except for that excellent comment about move
semantics... Should we put it somewhere else and delete the header as a
follow-up? Or just delete the header and carry on?

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

--HG--
extra : moz-landing-system : lando
2020-01-20 16:17:06 +00:00
Jamie Nicol
8d2ae82a39 Bug 1609002 - Attach fixed-position elements to the layout viewport in webrender. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D60292

--HG--
extra : moz-landing-system : lando
2020-01-18 01:10:45 +00:00
Nazım Can Altınova
d8afe0647a Bug 1609708 - Rename PROFILER_TRACING to PROFILER_TRACING_MARKER. r=gerald
Depends on D60229

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

--HG--
extra : moz-landing-system : lando
2020-01-17 21:29:15 +00:00
Sylvestre Ledru
cc2040bf21 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:48:34 +00:00
Dorel Luca
506e65bcab Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru
6689a37527 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:16:39 +00:00
sotaro
927d964708 Bug 1609598 - Fix stride in RendererRecordedFrame::GetSourceSurface() r=nical
Differential Revision: https://phabricator.services.mozilla.com/D60225

--HG--
extra : moz-landing-system : lando
2020-01-17 09:31:43 +00:00
Edwin Takahashi
9f3cc061e7 Bug 1608582 - tighten reftest annotation, part 3 r=jmaher
Changes:

Tighten reftest pixel differences now that reftest has been migrated fully over to ubuntu1804.

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

--HG--
extra : moz-landing-system : lando
2020-01-11 12:32:52 +00:00
Sawyer Bergeron
83a4d63f1b Bug 1605755 Add touch acceleration r=botond
Adds exponential acceleration to touchpad pan events to improve percieved scrolling responsiveness

Platforms affected: Linux, any using PANDELTA_PAGE

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

--HG--
extra : moz-landing-system : lando
2020-01-15 17:48:41 +00:00
Jeff Muizelaar
3ccd0cbeca Bug 1593574. Create an opaque surface for fallback when possible. r=mattwoodrow
This moves the opaqueness calculation out of if (blob) condition and
changes how we calculate the size of the fallback surface depending
on whether we have a compltely opaque snapped item or now.

This change allows scrollbars to marked as opaque on Windows which reduces the
GPU utilization in the DWM with DirectComposite on from 21% to 17% at 1080p and
29% to 24% at 4k

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

--HG--
extra : moz-landing-system : lando
2020-01-14 19:37:42 +00:00
Martin Stransky
8df4dc66e5 Bug 1608800 [Wayland] Implement DMABUF modifiers, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D59677

--HG--
extra : moz-landing-system : lando
2020-01-14 13:13:51 +00:00
Botond Ballo
a5c84444c5 Bug 1608506 - Split helper_basic_double_tap_zoom.html out into its own test group which only runs on mobile. r=hiro
This test needs mobile viewport sizing because we gate double tap zooming on that.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 00:22:55 +00:00
Botond Ballo
8691f729dc Bug 1608506 - Avoid using mobile viewport sizing in test_group_zoom-2.html. r=hiro
Note, in helper_bug1280013.html, since we are now zooming to 2x, the quantities
specified in CSS pixels need to be scaled down by 2x accordingly, to maintain
the relative positions of the elements and gestures on the screen.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 00:22:47 +00:00
Botond Ballo
d788b28e62 Bug 1608506 - Avoid using mobile viewport sizing in test_group_touchevents-4.html. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D59588

--HG--
extra : moz-landing-system : lando
2020-01-14 00:22:43 +00:00
Botond Ballo
5d070f7e85 Bug 1608506 - Use nsIDOMWindowUtils.setResolutionAndScaleTo() rather than initial-scale to zoom in most APZ mochitests. r=hiro
The exception is the tests in test_group_minimum_scale_size.html, which are
specifically testing mobile viewport sizing behaviour.

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

--HG--
extra : moz-landing-system : lando
2020-01-14 00:22:30 +00:00
Botond Ballo
8ef8a5826a Bug 1608506 - Only force dom.meta-viewport.enabled=true for APZ subtests that actually need it. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D59586

--HG--
extra : moz-landing-system : lando
2020-01-14 00:22:20 +00:00
Eric Rahm
78ee6675cf Bug 1606187 - Part 2b: Update users of nsClassHashtable to handle UniquePtr differences r=KrisWright,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D59042

--HG--
extra : moz-landing-system : lando
2020-01-13 19:18:56 +00:00
Martin Stransky
eb7719a2f0 Bug 1608380 [Wayland] Provide dmabuf config for texture and webgl backends, r=sotaro
We need to provide separated dmabuf configurations for WebGL and Texture backends
as we want to enable dmabuf for WebGL only right now.

Depends on D59487

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

--HG--
extra : moz-landing-system : lando
2020-01-13 13:30:26 +00:00
Andrew Osmond
3a7b9515de Bug 1600472 - Disable allowing sacrificing subpixel anti-aliasing for small screens. r=jrmuizel
This patch only allows sacrificing subpixel anti-aliasing when the
screen size is larger than WUXGA, and when the force disable pref is not
set. In the future, we may also add disable this for high end GPUs.

This also consolidates the WebRender debug flags to use the same
signaling infrastructure to avoid needing to store the debug flag state
and check on each transaction. Instead it now applies the debug flag
updates when the gfxVar changes.

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

--HG--
extra : moz-landing-system : lando
2020-01-10 16:57:55 +00:00
Jamie Nicol
188f4eae4e Bug 1581868 - Make webrender schedule a frame immediately on resume. r=sotaro
On webrender on android, parent-process pages (eg about:support) were not being
rendered immediately after minimising then resuming the app, resulting in a
black screen. The problem was that webrender believed the previous frame was
still valid, and therefore that it did not need to render a new
one. Content-process pages were unnaffected because we clear cached resources
when the app is minimised, so we accidentally rendered a new frame on
resumption.

To fix this we always force a new frame to be rendered immediately on
resumption. This uncovers a race condition which causes us to sometimes render
frames at the wrong size when the window size has changed (for example when
showing or hiding the keyboard), so that is also fixed.

This also fixes a bug affecting fenix, where when opening a page in a new tab
the portion of the screen where the keyboard used to be would remain black until
the page had loaded. This no longer occurs because we force a composite as soon
as the keyboard is hidden.

Additionally, this patch reverts the original attempt at fixing this
bug, as it is not necessary.

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

--HG--
extra : moz-landing-system : lando
2020-01-10 02:01:30 +00:00
Sylvestre Ledru
c521758c5e Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2020-01-09 21:50:11 +00:00
Mihai Alexandru Michis
05d3819e43 Backed out changeset ec0e9a72aebb (bug 1600472) for causing bustages in WebRenderBridgeParent.cpp
CLOSED TREE
2020-01-09 18:06:13 +02:00
Andrew Osmond
3b234b153a Bug 1600472 - Disable allowing sacrificing subpixel anti-aliasing for small screens. r=jrmuizel
This patch only allows sacrificing subpixel anti-aliasing when the
screen size is larger than WUXGA, and when the force disable pref is not
set. In the future, we may also add disable this for high end GPUs.

This also consolidates the WebRender debug flags to use the same
signaling infrastructure to avoid needing to store the debug flag state
and check on each transaction. Instead it now applies the debug flag
updates when the gfxVar changes.

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

--HG--
extra : moz-landing-system : lando
2020-01-09 15:23:38 +00:00
Boris Chiou
30dd733fce Bug 1591629 - Rename mozilla::MotionPathData as mozilla::ResolvedMotionPathData. r=hiro
To avoid the ambiguous name because we also have layers::MotionPathData.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 09:02:38 +00:00
Boris Chiou
74964a38a3 Bug 1591629 - Split TransformData into 2 parts - transform data and motion path data. r=hiro
So we don't need to create motion path data if there is no offset-path style
and no animations of offset-path.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 09:02:36 +00:00
Boris Chiou
5d817ca9a4 Bug 1591629 - Keep TransformData only in the first element when passing animation data through IPC. r=hiro
The benefits are:
1. For the rest `layers::Animation`s, their `TransformData` are `Nothing()`,
   so we can avoid any posisible copy.
2. In the compositor, we move `TransformData` out of the array, and use
   `UniquePtr` to avoid including AnimationHelper.h into AnimationInfo.h,
   which causes some compilation errors because LayersMessages.h is not
   visible in AnimationInfo.h.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 09:02:28 +00:00
Botond Ballo
cc40daadb6 Bug 1607764 - Protect all accesses to Axis::mVelocity with the APZC lock. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D59252

--HG--
extra : moz-landing-system : lando
2020-01-09 01:42:05 +00:00
Emilio Cobos Álvarez
f04a2f9e31 Bug 1607846 - Cleanup a bit usage of MustPaintOnContentSide(). r=jrmuizel
This is a pre-requisite cleanup, as the FrameLayerBuilder code ends up calling
this unconditionally, and thus the assertion on the other patch can end up
failing. Hopefully it's dead code, though, so no big deal.

Tweak the WebRender code to avoid two virtual calls in the common path, too.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 23:30:44 +00:00
Jeff Gilbert
0dfd1a2a0d Bug 1477756 - Fix all webgl regression tests according to CI. r=handyman
(This is a combination of 31 commits)

* Fix Linux compilation.

* Fix mac compilation.

* CI compile fixes.

* printf's size_t is %zu. %tu would be unsigned ptrdiff_t.

* No non-ref Maybe args.

* MOZ_CRASH for noreturn

* Handle implied texture sizes, rewrite comment stripping.

* Replace e.g. WebGLProgramInner with simpler webgl::ProgramKeepAlive.

* Bounce ValidateProgram call off driver.

* Uniform name length limit, cubemap fb-attach, non-array uniforms, undersized texImage views.

* alignas for uint8_t[sizeof(float)*N] pun buffers.

* CC fixes?

* Fill attrib0Active.

* Repair max-warnings limit.

* This is basically required in order for CI's logging to not explode.

* Don't cache WebGLMemoryTracker.

* Deleted prog/shader error, no texSubImage(null), client-side fingerprint resist for exts.

* Fix GetUniformIndices and MakeRangeFromView.

* CC Traverse base class from within derived class to fix leaking the world. :(

* PauseTransformFeedback
* TexImage video fastpath
* GetFragLocation for arrays
* Forbid BindBufferRange during TF

* Mark tests and fix RBAB query and test.

* Change(!) query deletion behavior to match spec.
* Mark conformance2/query/query.html failing for now.

* Implicitly EndQuery on DeleteQuery while spec is in flux.

* Fix error code for test.

* RAII LruPosition for WebGL context limit.

* Include std::list.

* Mark CompileResult and LinkResult.pending as false when retrieved.

* Hold strong-ref to NotLostData during Run<> to prevent LoseContext=>UAF.

* Don't assume GetUniformLocation(foo+'[0]') means foo is an array.
* Don't assume !mCanvasElement means !!mOffscreenCanvas.

* Handle composition while context-lost.

* All non-value-init members must be const or have inline init.

* Mark passing tests on Linux.

Depends on D54019

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:23 +00:00
Jeff Gilbert
e1d0fe64bb Bug 1477756 - Client-side bindings mirror for precise CC, and merge similar codepaths. r=handyman
* Context loss using RAII
* Move Program reflection Client-side

Depends on D54018

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:16 +00:00
David Parks
198fa063c2 Bug 1477756 - Initial out-of-process WebGL implementation. r=mccr8,handyman
Splits WebGLContext into ClientWebGLContext and HostWebGLContext.  The Client enables the JS-control of a WebGL context in a content procecss while the Host executes the WebGL graphics operations (via a WebGLContext that maintains much of the existing code) in the compositor process.  At this point, the cross-process behavior is disabled -- this series of patches is an incremental step toward that final goal.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 22:19:14 +00:00
sotaro
68439d9c26 Bug 1598998 - Fix CanvasContextType::ImageBitmap handling r=nical
Differential Revision: https://phabricator.services.mozilla.com/D56348

--HG--
extra : moz-landing-system : lando
2020-01-08 01:12:50 +00:00
Tom Schuster
d1b15f3063 Bug 1605854 - Remove toSource from fission tests. r=kmag,botond
Differential Revision: https://phabricator.services.mozilla.com/D58485

--HG--
extra : moz-landing-system : lando
2020-01-07 13:15:59 +00:00
Edwin Takahashi
7a96abe4f1 Bug 1607294 - add fuzzy-if annotations for failures in gfx/layers/apz/test/reftest/reftest.list r=jmaher
Changes:

For webrenderer tests, the scrollbar causes failures in the expected pixel difference values. Adjust the expectations of multiple tests that are affected.

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

--HG--
extra : moz-landing-system : lando
2020-01-06 23:16:37 +00:00
Mihai Alexandru Michis
c8ca91e7db Backed out changeset 67142a370d4a (bug 1598998) for causing failures in ImageBitmapRenderingContext.cpp
CLOSED TREE

--HG--
extra : histedit_source : 1e4895b3c8773f7881b99f1ab0fca9c6b64b7644
2020-01-07 01:49:59 +02:00
sotaro
374fa2d1ea Bug 1598998 - Fix CanvasContextType::ImageBitmap handling r=nical
Differential Revision: https://phabricator.services.mozilla.com/D56348

--HG--
extra : moz-landing-system : lando
2020-01-06 10:14:15 +00:00
David Parks
475a851ce8 Bug 1600595: Part 5 - Make RecvReadbackAsyncPluginSurface use ReadbackTexture r=mattwoodrow
Use the new utility function, introduced in Part 3, to implement async plugin surface's read to CPU texture.

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

--HG--
extra : moz-landing-system : lando
2020-01-04 19:37:39 +00:00
David Parks
5f501cb3b8 Bug 1600595: Part 4 - Make D3D11ShareHandleImage use CreateBGRA8DataSourceSurfaceForD3D11Texture r=mattwoodrow
Refactor D3D11ShareHandleImage::GetAsSourceSurface to use the new utility method added in Part 3.

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

--HG--
extra : moz-landing-system : lando
2020-01-04 19:37:01 +00:00
David Parks
c8478e9ba2 Bug 1600595: Part 2 - Change BufferTexture to allow any IShmemAllocator owner r=mattwoodrow
The only reason BufferTexture needs a LayersIPCChannel instead of the IShmemAllocator base interface is that it needs to know if the allocator is cross-process or not.  Both LayersIPCChannel and ISurfaceAllocator use IsSameProcess() for this but without a common interface for it.  Rather than further complicate the inheritance diagram for the layers and IPDL core classes, this patch makes BufferTexture handle both with generic code.

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

--HG--
extra : moz-landing-system : lando
2020-01-04 19:35:38 +00:00
David Parks
611dfe0fcb Bug 1600595: Part 1 - Consolidate ShmemAllocator and IShmemAllocator into one class r=nical
IShmemAllocator was introduced in bug 1272018 as a planned replacement for ShmemAllocator.  They are essentially the same interface.  This patch removes ShmemAllocator.

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

--HG--
extra : moz-landing-system : lando
2020-01-04 19:34:59 +00:00
Botond Ballo
ac360dc050 Bug 1606859 - Hold mRecursiveMutex while calling Axis::StartTouch(). r=tnikkel
StartTouch() sets axis fields like mAxisLocked which can be read by the
sampler thread by GetVelocity().

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

--HG--
extra : moz-landing-system : lando
2020-01-03 23:32:13 +00:00
Botond Ballo
dd379dc091 Bug 1606807 - Protect the access of AsyncPanZoomController::mState in ReportCheckerboard(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D58657

--HG--
extra : moz-landing-system : lando
2020-01-03 23:13:39 +00:00
Sean Feng
1b23bcd87b Bug 1606661 - Fix the race condition in AsyncPanZoomController::RecordScrollPayload r=botond
Differential Revision: https://phabricator.services.mozilla.com/D58649

--HG--
extra : moz-landing-system : lando
2020-01-03 21:34:02 +00:00
Boris Zbarsky
613f2313da Bug 1606672. Change nsIRunnablePriority values so increasing value indicates increased priority. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D58539

--HG--
extra : moz-landing-system : lando
2020-01-02 20:07:40 +00:00
Kris Taeleman
e673d8a673 Bug 1600652 - Update Scroll frame metrics for android so text select popup is in correct location. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D58165

--HG--
extra : moz-landing-system : lando
2019-12-31 22:30:13 +00:00
Markus Stange
adfb18b9ed Bug 1592026 - Add a NativeLayerRootSnapshotter API and implement it with CARenderer. r=jrmuizel
Suggestions for a better name than "snapshotter" are welcome.
This is a separate object so that the lifetime of its GLContext isn't governed by the lifetime of the NativeLayerRootCA.
The NativeLayerRootCA gets destroyed on the main thread, but GLContext uses non-threadsafe weak pointer support, so it wants to be destroyed on the same thread that it was created on.
So now the GLContext lives on the snapshotter, which is created and destroyed on the renderer thread.

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

--HG--
extra : moz-landing-system : lando
2019-12-29 12:20:28 +00:00
Markus Stange
ea3d0df95b Bug 1592026 - Make NativeLayer(Root)CA build two representations: an onscreen representation and an offscreen representation. r=jrmuizel
The onscreen representation is attached to the NSView.
The offscreen representation is free-floating but will be used in a CARenderer in an upcoming patch.

Each representation is only updated on demand.

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

--HG--
extra : moz-landing-system : lando
2019-12-29 12:20:09 +00:00
Markus Stange
0a274af543 Bug 1592026 - Move the responsibility of applying NativeLayerCA changes to native CALayers into a Representation struct. r=jrmuizel
This will allow us to have two representations per NativeLayerCA in the next patch.

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

--HG--
extra : moz-landing-system : lando
2019-12-29 12:19:51 +00:00
Markus Stange
f3af2c5fa0 Bug 1592026 - Replace separate mReadySurface field with a bool mMutatedFrontSurface. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D57065

--HG--
extra : moz-landing-system : lando
2019-12-29 12:19:31 +00:00
Markus Stange
7385a343e6 Bug 1592026 - Clear sublayers on layer root destruction. This addresses a fixme. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D57064

--HG--
extra : moz-landing-system : lando
2019-12-29 12:19:14 +00:00
Markus Stange
5b30e92ef7 Bug 1592026 - Create AutoCATransaction. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D57063

--HG--
extra : moz-landing-system : lando
2019-12-29 12:18:56 +00:00
Markus Stange
239125933c Bug 1592026 - Move NativeLayerRoot::CommitToScreen call from PostRender into the compositors. r=jrmuizel
This makes it more similar to how SwapBuffers was used.
This patch also makes us call glFlush directly when using native layers, rather than going through the misleadingly-named GLContext::SwapBuffers method.

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

--HG--
extra : moz-landing-system : lando
2019-12-29 12:41:04 +00:00
Markus Stange
c96a136f94 Bug 1592026 - Move AsyncCATransaction suspension into NativeLayerRootCA. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D57061

--HG--
extra : moz-landing-system : lando
2019-12-29 12:18:32 +00:00
Markus Stange
a090f2ff17 Bug 1592026 - Reorder some methods and add a getter for the backing scale. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D57060

--HG--
extra : moz-landing-system : lando
2019-12-29 12:18:30 +00:00
Andrew Osmond
73ee861def Bug 1604535 - Avoid copying image surfaces when used with OMTP. r=tnikkel
When one uses SourceSurfaceRawData to wrap a data pointer, it will
perform a copy of said data if GuaranteePersistence is called. This is
done for DrawTargetCapture, which is used with OMTP. Prior to this
patch, image surfaces would be wrapped by a SourceSurfaceRawData when
using the basic compositor on any non-Linux platform (since Linux does
not support volatile memory). This means every time imgFrame::Draw is
called with OMTP, a copy of the image will be made. Images don't need
this property since the data is already going to persist, so this patch
adds a new class SourceSurfaceMappedData, which takes a ScopedMap
keeping the underlying surface open and readable.

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

--HG--
extra : moz-landing-system : lando
2019-12-25 21:27:46 +00:00
Manish Giri
7a702cd74b Bug 1605664 - Remove redundant return in void function. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D58225

--HG--
extra : moz-landing-system : lando
2019-12-26 08:47:07 +00:00
sotaro
271d83b87e Bug 1605906 - Add Pause/Resume handling to CompositorOGL for Wayland r=aosmond
Differential Revision: https://phabricator.services.mozilla.com/D58210

--HG--
extra : moz-landing-system : lando
2019-12-25 12:01:54 +00:00
Mihai Alexandru Michis
cd24fc1ebd Backed out 5 changesets (bug 1600595) for causing webgl tests and reftests to time out.
CLOSED TREE

Backed out changeset 2f3a6a8e47bc (bug 1600595)
Backed out changeset c6712886b650 (bug 1600595)
Backed out changeset e905d5af4919 (bug 1600595)
Backed out changeset c497070467dd (bug 1600595)
Backed out changeset 27fd9a1b31f0 (bug 1600595)
2019-12-24 09:37:02 +02:00
David Parks
38dd73cd2b Bug 1600595: Part 5 - Make RecvReadbackAsyncPluginSurface use ReadbackSharedTexture r=mattwoodrow
Use the new utility function, introduced in Part 3, to implement async plugin surface's read to CPU texture.

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

--HG--
extra : moz-landing-system : lando
2019-12-23 21:28:23 +00:00
David Parks
883c673715 Bug 1600595: Part 4 - Make D3D11ShareHandleImage use CreateBGRA8DataSourceSurfaceForD3D11Texture r=mattwoodrow
Refactor D3D11ShareHandleImage::GetAsSourceSurface to use the new utility method added in Part 3.

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

--HG--
extra : moz-landing-system : lando
2019-12-23 21:27:44 +00:00
David Parks
7ec803489a Bug 1600595: Part 2 - Change BufferTexture to allow any IShmemAllocator owner r=mattwoodrow
The only reason BufferTexture needs a LayersIPCChannel instead of the IShmemAllocator base interface is that it needs to know if the allocator is cross-process or not.  Both LayersIPCChannel and ISurfaceAllocator use IsSameProcess() for this but without a common interface for it.  Rather than further complicate the inheritance diagram for the layers and IPDL core classes, this patch makes BufferTexture handle both with generic code.

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

--HG--
extra : moz-landing-system : lando
2019-12-23 21:26:16 +00:00
David Parks
6ffeec2049 Bug 1600595: Part 1 - Consolidate ShmemAllocator and IShmemAllocator into one class r=nical
IShmemAllocator was introduced in bug 1272018 as a planned replacement for ShmemAllocator.  They are essentially the same interface.  This patch removes ShmemAllocator.

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

--HG--
extra : moz-landing-system : lando
2019-12-23 21:25:33 +00:00
Kris Taeleman
a49a561af8 Bug 1589669 - Fix snapping and rounding errors causing picture caching invalidation when zoomed in. r=aosmond,botond
* Fix crash due to shift left causing overflow (debug only)
* Remove rounding of scrolling offsets and snap to view space instead of
world space

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

--HG--
extra : moz-landing-system : lando
2019-12-23 19:23:43 +00:00
Gurzau Raul
5f548f331e Backed out changeset 6493da33ecac (bug 1589669) for failing at test_bug1277814.html on a CLOSED TREE. 2019-12-23 20:27:51 +02:00
Kris Taeleman
c52ca82a75 Bug 1589669 - Fix snapping and rounding errors causing picture caching invalidation when zoomed in. r=aosmond,botond
* Fix crash due to shift left causing overflow (debug only)
* Remove rounding of scrolling offsets and snap to view space instead of
world space

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

--HG--
extra : moz-landing-system : lando
2019-12-20 17:03:24 +00:00
Chris Peterson
406763af7f Bug 1570499 - Part 1: Replace MOZ_FALLTHROUGH macro with C++17's [[fallthrough]] attribute. r=froydnj
This changeset is a simple find and replace of `MOZ_FALLTHROUGH` and `[[fallthrough]]`.

Unfortunately, the MOZ_FALLTHROUGH_ASSERT macro (to assert on case fallthrough in debug builds) is still necessary after switching from [[clang::fallthrough]] to [[fallthrough]] because:

* MOZ_ASSERT(false) followed by [[fallthrough]] triggers a -Wunreachable-code warning in DEBUG builds
* but MOZ_ASSERT(false) without [[fallthrough]] triggers a -Wimplicit-fallthrough warning in NDEBUG builds.

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

--HG--
extra : moz-landing-system : lando
2019-12-20 07:16:43 +00:00
Markus Stange
df5cfbc8df Bug 1592038 - Share depth buffers across IOSurface framebuffers with the same size. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D54863

--HG--
extra : moz-landing-system : lando
2019-12-19 02:55:15 +00:00
Markus Stange
7319c5e46d Bug 1592038 - Allow sharing depth and stencil buffers between multiple MozFramebuffers. r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D54862

--HG--
extra : moz-landing-system : lando
2019-12-19 03:26:19 +00:00
Markus Stange
b1b5061130 Bug 1599251 - Don't keep surfaces which never become unused in NativeLayer::mSurfaces. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D55578

--HG--
extra : moz-landing-system : lando
2019-12-18 20:34:43 +00:00
Markus Stange
d1c4429158 Bug 1599251 - Don't leave unused surfaces in the swap chain. r=jrmuizel
When updating the layer at 60fps, the surface that we would be leaving behind
here would usually still be in use at the time this method was called.
But when some time has passed since the last update, usually all surfaces in
mSurfaces are no longer "in use" so we can "compress" the swap chain to be
double-buffered.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 20:34:28 +00:00
Botond Ballo
be4d75b35a Bug 1604956 - Avoid calling HasPaintedDisplayPort() with a null content element. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D57719

--HG--
extra : moz-landing-system : lando
2019-12-19 00:12:29 +00:00
Markus Stange
0f70058b6f Bug 1592044 - Reduce the frequency of IOSurface and framebuffer creation and destruction with the help of a surface pool. r=jgilbert
There are multiple SurfacePools: Main thread painting and the non-WebRender compositors create a new pool per window, and WebRender creates one shared pool across all windows. The non-WebRender users set the pool size limit to zero, i.e. no recycling across paints. This preserves the pre-existing behavior.
WebRender's pool size is configurable with the gfx.webrender.compositor.surface-pool-size pref.
Every window holds on to a SurfacePoolHandle. A SurfacePoolHandle has an owning reference to the pool, via a surface pool wrapper. Once all handles are gone, the surface pool goes away, too.
The SurfacePool holds on to IOSurfaces and MozFramebuffers. Both are created on demand, independently, but are associated with each other.
A given NativeLayer uses only one surface pool handle during its lifetime. The native layer no longer influences which GLContext its framebuffers are created for; the GL context is now managed by the surface pool handle.
As a result, a NativeLayer can no longer change which GLContext its framebuffers are created by.
So in the future, if we ever need to migrate a window frome one GLContext to another, we will need to recreate the NativeLayers inside it. I think that's ok.

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

--HG--
extra : moz-landing-system : lando
2019-12-18 21:01:51 +00:00
David Parks
b6796ca47b Bug 1600032: Make GPUVideoTextureHost plugin lookup infallible r=mattwoodrow
If the D3D11TextureData backing the plugin variant of a GPUVideoTextureHost is requested, but the ImageBridge has already released or lost it then, instead of null, we now return a NullPluginTextureHost in order to avoid IPDL serialization failure down the line.  This mirrors the degenerate case of RemoteVideoDecoder behavior, indroduced to fix the same issue with that variant of GPUVideoTextureHost, in bug 1562616.

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

--HG--
extra : moz-landing-system : lando
2019-12-16 21:57:54 +00:00
Botond Ballo
e1f64c8a8e Bug 1601568 - Only send a SetTargetAPZC notification right away if the target has a displayport and it has been painted. r=tnikkel
Merely checking for having a displayport isn't enough, because the paint to
tell APZ about the new scroll frame could still be pending.

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

--HG--
extra : moz-landing-system : lando
2019-12-16 19:45:02 +00:00
Botond Ballo
19311b0174 Bug 1603224 - Guard against division-by-zero in AsyncPanZoomController::ScrollSnapToDestination(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D57179

--HG--
extra : moz-landing-system : lando
2019-12-14 00:24:31 +00:00
Botond Ballo
7a7b408666 Bug 1603280 - Guard against division-by-zero in AsyncPanZoomController::ComputePLPPI(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D57180

--HG--
extra : moz-landing-system : lando
2019-12-14 03:05:53 +00:00
Cosmin Sabou
bafbbf8086 Backed out changeset 1644a92ede46 (bug 1600032) for causing build bustages on ImageBridgeParent.cpp. CLOSED TREE 2019-12-12 23:27:29 +02:00
David Parks
b4d63744f2 Bug 1600032: Make GPUVideoTextureHost plugin lookup infallible r=mattwoodrow
If the D3D11TextureData backing the plugin variant of a GPUVideoTextureHost is requested, but the ImageBridge has already released or lost it then, instead of null, we now return a NullPluginTextureHost in order to avoid IPDL serialization failure down the line.  This mirrors the degenerate case of RemoteVideoDecoder behavior, introduced to fix the same issue with that variant of GPUVideoTextureHost, in bug 1562616.

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

--HG--
extra : moz-landing-system : lando
2019-12-12 00:32:54 +00:00
Emilio Cobos Álvarez
8923c96955 Bug 1526725 - followup: Fix a test that's intermittently failing more often.
MANUAL PUSH: Intermittent orange fix.
2019-12-12 05:44:35 +01:00
Emilio Cobos Álvarez
4abc5101ed Bug 1526725 - Make wheel events passive by default on Nightly. r=smaug
This turned out to not be the root cause for that broken site, but I wrote the
code so... I enabled it on Nightly only to see if there's fallout, I don't think
we need to ship this in the near term, your call.

Depends on D56555

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

--HG--
extra : moz-landing-system : lando
2019-12-11 22:15:15 +00:00
Dorel Luca
a431475073 Backed out 2 changesets (bug 1526725) as per dev's request
Backed out changeset 98bafb894b5d (bug 1526725)
Backed out changeset 2bbbaccb0d06 (bug 1526725)

--HG--
extra : rebase_source : c71e12cb776f5f6d56400bfb398648be803b0ac7
2019-12-10 19:37:45 +02:00
Emilio Cobos Álvarez
85117004f2 Bug 1526725 - Make wheel events passive by default on Nightly. r=smaug
This turned out to not be the root cause for that broken site, but I wrote the
code so... I enabled it on Nightly only to see if there's fallout, I don't think
we need to ship this in the near term, your call.

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

--HG--
extra : moz-landing-system : lando
2019-12-10 16:59:34 +00:00
Emilio Cobos Álvarez
707ed5c818 Bug 1602421 - Remove some useless includes. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D56350

--HG--
extra : moz-landing-system : lando
2019-12-09 14:53:50 +00:00
Sean Feng
6db9bbdc3e Bug 1500465 - Measure touch scroll latency and connect to telemetry. r=mstange,botond
Differential Revision: https://phabricator.services.mozilla.com/D36246

--HG--
extra : moz-landing-system : lando
2019-12-07 03:57:56 +00:00
Emilio Cobos Álvarez
4a3be9604a Bug 1602317 - Switch style system to associated constants-in-body. r=heycam
This is closer to the equivalent Rust code.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 03:32:28 +00:00
Emilio Cobos Álvarez
25987bb3e9 Bug 1602317 - Remove some useless includes. r=heycam
This intended to fix some windows builds, but that didn't end up working.

This removes some unused members and such, and fixes some missing includes
that they uncover (whoops).

This was needed because some windows headers used in the sandbox redefine STRICT
(which is used by `StyleContain`) and `TRANSPARENT`, which is used by some WR
stuff.

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

--HG--
extra : moz-landing-system : lando
2019-12-09 12:52:53 +00:00
Timothy Nikkel
1007edc182 Bug 1601527. In APZCTreeManager::ReceiveInputEvent for pinch gesture inputs adjust the target apzc to the root content. r=botond
Otherwise we hit this assert

https://searchfox.org/mozilla-central/rev/efdf9bb55789ea782ae3a431bda6be74a87b041e/gfx/layers/apz/src/AsyncPanZoomController.cpp#1209

The adjusting mentioned in that comment doesn't seem to happen on the path that macOS pinch gesture events use.

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

--HG--
extra : moz-landing-system : lando
2019-12-07 03:19:07 +00:00
sotaro
d5a300b92b Bug 1599887 - Update frame is when WR rendering is skipped r=nical
wr::WebRenderPipelineInfo needs to be handled even when WR rendering does not happen.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 13:06:21 +00:00
Gabriele Svelto
69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
sotaro
8cbdbb0cb2 Bug 1601531 - Tag image descriptors with PREFER_COMPOSITOR_SURFACE where appropriate r=gw
Differential Revision: https://phabricator.services.mozilla.com/D55922

--HG--
extra : moz-landing-system : lando
2019-12-06 06:53:57 +00:00
Barret Rennie
1bf300b45c Bug 1601047 - Mark composition recorder as stopped when stopping it r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D55716

--HG--
extra : moz-landing-system : lando
2019-12-03 20:37:21 +00:00
Jamie Nicol
ecf8b8f3eb Bug 1599248 - Use local raster space when animating a double tap zoom. r=botond
In bug 1531142 we made it so that when a spatial node is being pinch-zoomed we
use a local raster-space to avoid rerasterizing glyphs for every slight change
in zoom level. This makes it so that we also apply the same trick when
being asynchronously zoomed by a double-tap gesture.

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

--HG--
extra : moz-landing-system : lando
2019-12-05 11:35:38 +00:00
Botond Ballo
a68b4de65d Bug 1591519 - Re-enable test_group_touchevents on android. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D55905

--HG--
extra : moz-landing-system : lando
2019-12-05 06:48:42 +00:00
Botond Ballo
c456ac6d8c Bug 1476893 - Split helper_bug1280013.html into its own test group. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D55904

--HG--
extra : moz-landing-system : lando
2019-12-05 06:34:37 +00:00
sotaro
c9b4baab9c Bug 1597861 - Pause compositor during hiding Wayland window r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D53906

--HG--
extra : moz-landing-system : lando
2019-12-02 06:56:27 +00:00
sotaro
0c611d19d9 Bug 1599653 - Support CanvasContextType::ImageBitmap with WebRender r=nical
Differential Revision: https://phabricator.services.mozilla.com/D54890

--HG--
extra : moz-landing-system : lando
2019-11-28 16:50:43 +00:00
Botond Ballo
3ea796c95f Bug 1600567 - Avoid accessing APZCTreeManager::mRootNode without mTreeLock held in SendSubtreeTransformsToChromeMainThread(). r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D55473

--HG--
extra : moz-landing-system : lando
2019-12-02 20:06:12 +00:00
Timothy Nikkel
df4a65de6c Bug 1586843. Pass SideBits for fixed position content to webrender so it can pass it back via the HitTest api. r=botond
We add the SideBits to the data we store in the FixedPosScrollTargetTracker. nsDisplayCompositorHitTestInfo then passes the side bits when it sets hit test info. We then pack the side bits into the hit test info bits; luckily they were only using 12 of 16 bits. The wr HitTest api then extracts the side bits from the hit test info bits and passes them back.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 23:06:59 +00:00
Timothy Nikkel
51f49f02a6 Bug 1583380. Collect fixed position info on APZCTreeManager and use that to provide transforms to webrender via SampleForWebRender. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D54403

--HG--
extra : moz-landing-system : lando
2019-11-29 23:06:41 +00:00
Timothy Nikkel
fb46cff121 Bug 1583380. Plumb SideBits from the display list to WebRenderScrollDataWrapper. r=botond
The plumbing from there to the HitTestingTreeNode is already in place for the non-webrender case.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 23:06:34 +00:00
Timothy Nikkel
5d06f93d9e Bug 1583380. Protect APZCTreeManager::mFixedLayerMargins by mMapLock instead of mTreeLock. r=botond
We do this because we will need to access it in APZCTreeManager::SampleForWebRender which can't hold mTreeLock.

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

--HG--
extra : moz-landing-system : lando
2019-11-29 23:06:24 +00:00
Timothy Nikkel
297e2538f7 Bug 1583380. Plumb a fixed position webrender animation id from the display list to the HitTestingTreeNode. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D54399

--HG--
extra : moz-landing-system : lando
2019-11-29 23:11:18 +00:00