Commit Graph

404 Commits

Author SHA1 Message Date
Andrew Osmond
8b68b2b0a8 Bug 1663923 - Cover more WebRender initialization failure paths with explicit reasons. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D89596
2020-09-09 15:47:46 +00:00
Andrew Osmond
272f98121e Bug 1662836 - Expose detailed initialization failure reason for WebRender. r=kvark
We don't know why we see initialization failures in the telemetry which
makes it hard to investigate why users aren't getting WebRender and
instead fallback to basic. Let's expose the detailed error message
WebRender already generates and puts in the critical log.

Differential Revision: https://phabricator.services.mozilla.com/D89185
2020-09-08 02:03:26 +00:00
Lee Salzman
fb8fe83f61 Bug 1657498 - report Software WebRender in about:support. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D87122
2020-08-14 22:30:05 +00:00
Matt Woodrow
71b4f73582 Bug 1656818 - Move decision to flip WebRender readback closer to the source, and make it correct for SWGL. r=lsalzman,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D86892
2020-08-14 18:40:09 +00:00
Mihai Alexandru Michis
d4e03fc649 Backed out changeset d9626670ddb5 (bug 1657498) for causing multiple reftest failures.
CLOSED TREE
2020-08-14 10:54:22 +03:00
Matt Woodrow
1cb483c49c Bug 1657498 - Report software WR in about:support. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D86088
2020-08-14 03:34:32 +00:00
Csoregi Natalia
d3dd708533 Backed out 4 changesets (bug 1656817, bug 1656818, bug 1658858) for bustage on RendererOGL.cpp. CLOSED TREE
Backed out changeset 9c8e4ec4e47c (bug 1656818)
Backed out changeset 92252cfd26de (bug 1656818)
Backed out changeset 1bebb79150d6 (bug 1656817)
Backed out changeset e1becb3a2fb5 (bug 1658858)
2020-08-14 00:25:44 +03:00
Matt Woodrow
3ab6d4a907 Bug 1656818 - Move decision to flip WebRender readback closer to the source, and make it correct for SWGL. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D86892
2020-08-13 20:43:35 +00:00
Kartikaya Gupta
54d9054dd1 Bug 1251612 - Support the GetFrameUniformity API in content processes. r=botond,froydnj
This moves the IPC mechanism from PCompositorBridge to PLayerTransaction/
PWebRenderBridge, so that it can be used by content processes like the other
test APIs. It still only produces actual data for the layers backend; for
WR it will just return empty datasets.

Differential Revision: https://phabricator.services.mozilla.com/D86016
2020-08-05 21:42:06 +00:00
Glenn Watson
8978ee55ca Bug 1656820 - Remove content_size from scene pipeline. r=nical
Previously, the content_size was used when defining an iframe
to set the size of the root scrollable area.

However, this was never useful (the root pipeline scroll frame
is not considered a scroll root, it's more of a placeholder).
The scroll frame for content is typically defined within the
iframe display list (which also allows non-scrolled content
within the iframe, such as a background rectangle color).

The existing content_size was causing problems in Gecko because
there are some snapping / rounding inaccuracies with fractional
DPI ratios, resulting in root scroll frames with +/- 1 pixel
scrollable size.

The simplest fix for this is to remove content_size altogether
and rely on the iframe display item to define the content size
of the root scroll frame for a pipeline.

Differential Revision: https://phabricator.services.mozilla.com/D85719
2020-08-03 20:57:30 +00:00
Kartikaya Gupta
a97d9d37f8 Bug 1652986 - Restore ability to dump the WR display list interleaved with the the gecko DL. r=miko
The extra_data_offset wasn't being set properly in the built display list's
descriptor, so no items were being found. With that fixed it became evident
that we need to disable the display list item cache for dumping to work, since
we can't easily look up reuse items when doing the interleaved dumping. So
this patch also adds some machinery for that.

Differential Revision: https://phabricator.services.mozilla.com/D83778
2020-07-16 14:19:41 +00:00
sotaro
6b4ed853a0 Bug 1642839 - Implement WebRenderLayerManager::SendInvalidRegion() r=jrmuizel
When DWM is disabled, each window does not have own back buffer. They would paint directly to a buffer that was to be displayed by the video card. WM_PAINT via SendInvalidRegion() requests necessary re-paint. With it, RenderCompositorANGLE does not need to disable partial present.

Differential Revision: https://phabricator.services.mozilla.com/D77989
2020-06-05 05:03:40 +00:00
Kartikaya Gupta
a745c4e3c8 Bug 1622360 - Singularize the TransactionData across IPC. r=jrmuizel
Depends on D75386

Differential Revision: https://phabricator.services.mozilla.com/D75387
2020-05-15 00:10:36 +00:00
Kartikaya Gupta
b8f9aa4d43 Bug 1622360 - Singularize the DisplayListData across IPC. r=jrmuizel
Depends on D75384

Differential Revision: https://phabricator.services.mozilla.com/D75386
2020-05-15 00:08:52 +00:00
Kartikaya Gupta
03512b4353 Bug 1622360 - Rename RenderRootUpdates. r=jrmuizel
Depends on D75383

Differential Revision: https://phabricator.services.mozilla.com/D75384
2020-05-15 00:08:03 +00:00
Kartikaya Gupta
b0d2f24179 Bug 1622360 - Rename RenderRootDisplayListData. r=jrmuizel
Depends on D75125

Differential Revision: https://phabricator.services.mozilla.com/D75383
2020-05-15 00:07:34 +00:00
Kartikaya Gupta
e971984db0 Bug 1622360 - Remove the RenderRoot enum entirely, along with the feature docs. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D75125
2020-05-15 00:07:01 +00:00
Kartikaya Gupta
726088a539 Bug 1622360 - Remove the mRenderRoot fields from the DL and Update structures. r=jrmuizel
Depends on D75123

Differential Revision: https://phabricator.services.mozilla.com/D75124
2020-05-15 00:06:28 +00:00
Kartikaya Gupta
cc2ab03597 Bug 1622360 - Drop RenderRootStateManager::mRenderRoot. r=jrmuizel
Depends on D74944

Differential Revision: https://phabricator.services.mozilla.com/D74945
2020-05-14 23:56:11 +00:00
Kartikaya Gupta
1d25b7047a Bug 1622360 - Stop passing around the render root on the UpdateResources codepath. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74942
2020-05-14 23:54:05 +00:00
Kartikaya Gupta
8c2754d952 Bug 1622360 - Stop feeding render root into WebRenderBridgeChild::*ParentCommand*. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74851
2020-05-12 14:37:10 +00:00
Kartikaya Gupta
163d5772bc Bug 1622360 - Remove resource subqueue machinery. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74846
2020-05-12 14:33:02 +00:00
Kartikaya Gupta
88f0c3f9e5 Bug 1622360 - Remove kRenderRoots. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74403
2020-05-11 20:08:05 +00:00
Kartikaya Gupta
eaeb32622b Bug 1622360 - Downgrade mStateManagers. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74185
2020-05-11 20:07:43 +00:00
Kartikaya Gupta
ab84612657 Bug 1622360 - Downgrade mLastDisplayListSize. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74184
2020-05-11 20:07:40 +00:00
Miko Mynttinen
ab9a0ed1a1 Bug 1633453 - Clear display item cache when the display list send fails or WR backend changes r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D72692
2020-04-29 02:26:08 +00:00
Kartikaya Gupta
f0651497a8 Bug 1627362 - Improve logging for fixed/sticky data on the WR codepath. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D70912
2020-04-15 20:01:05 +00:00
Kartikaya Gupta
1f9ae53752 Bug 1622360 - Downgrade builder dump index from RenderRootArray. r=jrmuizel
Depends on D70601

Differential Revision: https://phabricator.services.mozilla.com/D70602
2020-04-14 00:07:08 +00:00
Andreas Farre
9509fc894a Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

Differential Revision: https://phabricator.services.mozilla.com/D65936
2020-04-07 15:17:47 +00:00
Kartikaya Gupta
379e832b13 Bug 1622360 - Remove WebRenderScrollDataCollection. r=jrmuizel
This basically allowed managing a bunch of scroll data things in parallel
for all the render roots which we don't need anymore.

Differential Revision: https://phabricator.services.mozilla.com/D69845
2020-04-06 20:45:21 +00:00
Kartikaya Gupta
76b09208e0 Bug 1622360 - Remove the sub-builder machinery. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69844
2020-04-06 20:45:14 +00:00
Kartikaya Gupta
d62a769326 Bug 1622360 - Remove the code that deals with render root rects. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69843
2020-04-06 20:44:58 +00:00
Kartikaya Gupta
a63191538d Bug 1622360 - Downgrade mPendingScrollUpdates from RenderRootArray. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D69842
2020-04-06 20:44:46 +00:00
Kartikaya Gupta
3b0b02d960 Bug 1622360 - Remove the content render root. r=jrmuizel
Nothing creates the content render root anymore, so we can delete
references to it and wipe it off the face of the codebase. This makes
the non-default render root array a zero-length Array which is a template
specialization that lacks things like begin() end end(). So we need
to also rip out any code that tries to iterate these things, in order
to get compilation to succeed. The code would be a no-op anyway now
that there are no non-default render roots left.

Depends on D68864

Differential Revision: https://phabricator.services.mozilla.com/D68865
2020-04-01 13:39:12 +00:00
Miko Mynttinen
cb7a834f73 Bug 1624125 - Track display list changes in DisplayItemCache r=jrmuizel
This is needed because display lists and DisplayItemCache have different lifetimes. For example, display lists can outlive WebRenderLayerManager when device reset occurs.

A slightly nicer way of fixing this would be to couple DisplayItemCache with nsDisplayList or nsDisplayListBuilder. This is would currently require a lot of refactoring to look nice, because the painting code still supports non-retained display lists and non-WR code paths.

Differential Revision: https://phabricator.services.mozilla.com/D68193
2020-03-27 16:49:37 +00:00
Miko Mynttinen
5457a6cb38 Bug 1620005 - Refactor WebRender display item caching r=jrmuizel
DisplayItemBuilder now has methods:
```
void StartGroup(nsPaintedDisplayItem* aItem);
void CancelGroup();
void FinishGroup();
bool ReuseItem(nsPaintedDisplayItem* aItem);
```
WebRender display items previously created between calls to StartGroup() and FinishGroup() will be reused by a call to ReuseItem(),
which will push DisplayItem::ReuseItem(key) to WR display list, if the Gecko display item has been retained and reused.
Calling CancelGroup() will discard the display items that have been pushed after calling StartGroup().

For example, inside nsDisplayBackgroundColor::CreateWebRenderCommands():
```
aBuilder.StartGroup(this);
aBuilder.PushRect(r, r, !BackfaceIsHidden(),
                  wr::ToColorF(ToDeviceColor(mColor)));
aBuilder.FinishGroup();
```

Differential Revision: https://phabricator.services.mozilla.com/D65356
2020-03-11 18:13:45 +00:00
Andreea Pavel
fcc06500e7 Backed out changeset 91760460f914 (bug 1620005) for build bustages on a CLOSED TREE 2020-03-11 19:57:28 +02:00
Miko Mynttinen
96e49f62f3 Bug 1620005 - Refactor WebRender display item caching r=jrmuizel
DisplayItemBuilder now has methods:
```
void StartGroup(nsPaintedDisplayItem* aItem);
void CancelGroup();
void FinishGroup();
bool ReuseItem(nsPaintedDisplayItem* aItem);
```
WebRender display items previously created between calls to StartGroup() and FinishGroup() will be reused by a call to ReuseItem(),
which will push DisplayItem::ReuseItem(key) to WR display list, if the Gecko display item has been retained and reused.
Calling CancelGroup() will discard the display items that have been pushed after calling StartGroup().

For example, inside nsDisplayBackgroundColor::CreateWebRenderCommands():
```
aBuilder.StartGroup(this);
aBuilder.PushRect(r, r, !BackfaceIsHidden(),
                  wr::ToColorF(ToDeviceColor(mColor)));
aBuilder.FinishGroup();
```

Differential Revision: https://phabricator.services.mozilla.com/D65356
2020-03-11 17:40:18 +00:00
Miko Mynttinen
e8322a90fc Bug 1616335 - Add a pref to dump the serialized WebRender display list r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D63227
2020-02-21 01:08:10 +00:00
Csoregi Natalia
f97f61cdc5 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
23eaebc882 Bug 1616335 - Add a pref to dump the serialized WebRender display list r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D63227
2020-02-20 23:13:13 +00:00
Timothy Nikkel
164e9bbb89 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
2020-02-12 01:40:51 +00:00
Ciure Andrei
a53beec137 Backed out changeset d46cb79a9b55 (bug 1613143)for causing reftest fission failures CLOSED TREE 2020-02-12 03:20:15 +02:00
Timothy Nikkel
3982bfb2ae 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
2020-02-11 19:01:30 +00:00
sotaro
db19ca7ebb 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
2020-02-05 09:39:28 +00:00
Nazım Can Altınova
6c84e9b60a Bug 1609708 - Rename PROFILER_TRACING to PROFILER_TRACING_MARKER. r=gerald
Depends on D60229

Differential Revision: https://phabricator.services.mozilla.com/D60231
2020-01-17 21:29:15 +00:00
sotaro
cc952cfc70 Bug 1596630 - Remove mSyncObject->Synchronize() in RenderCompositorANGLE::BeginFrame() r=nical
mSyncObject->Synchronize() was necessary to handle a case that D3D Texture was created on main thread of content process and the Texture does not have a keyed mutex. But with WebRender, the situation does not happen often. Further the Synchronize() is sometimes very slow. Therefore it is better to remove it from RenderCompositorANGLE::BeginFrame().

Canvas 2d does not use keyed mutex yet. Then the change adds keyed mutex usage for the canvas 2d.

D3D11DXVA2Manager still uses the Synchronize(). In this case, the Synchronize() is manually called in D3D11DXVA2Manager::CopyToImage(). Then RenderCompositorANGLE still needs to create SyncObjectHost.

Differential Revision: https://phabricator.services.mozilla.com/D53168
2019-11-18 09:49:15 +00:00
Markus Stange
c4d8377aa4 Bug 1576390 - Remove now-unused DrawWindowOverlay and WindowOverlayChanged methods. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D52748
2019-11-13 02:24:06 +00:00
sotaro
f823995d25 Bug 1591346 - Remove EGL_ANGLE_experimental_present_path usage with WebRender r=gw
EGL_ANGLE_experimental_present_path was enabled for fast rendering to SwapChain by ANGLE. But current gecko does not request ANGLE to render to SwapChain for WebRender. Then we do not need to use EGL_ANGLE_experimental_present_path anymore. But Its usage still has a side effect that y is flipped. But OS compositor implementation on Windows does not want it. And it seems not good to continue to use EGL_ANGLE_experimental_present_path since it is experimental feature.

But when EGL_ANGLE_experimental_present_path is removed, rendering result of frame buffer is y flipped with ANGLE compared to other OpenGL implementation. It needs to be handled in WR. It is similar to chromium.

Differential Revision: https://phabricator.services.mozilla.com/D50604
2019-10-28 00:56:41 +00:00
Andrew Osmond
985dac6203 Bug 1574493 - Part 3. Stop rounding rects/clips during display list building. r=jrmuizel
Rounding in layout pixels is very close to snapping in raster pixels if
there are no transforms involved. This is why it worked most of the time
and fell flat in many edge cases. In future parts of this series, we
will trust scene building and frame building to do the heavy lifting for
snapping purposes.

Differential Revision: https://phabricator.services.mozilla.com/D45058
2019-09-14 16:17:04 +00:00