Commit Graph

34406 Commits

Author SHA1 Message Date
Razvan Maries
eedbf1137f Backed out changeset b197ca57677a (bug 1558915) for build bustages. CLOSED TREE 2019-08-07 01:04:43 +03:00
Tom Schuster
03c7998ef2 Bug 1558915 - Use infallible nsIURI::SchemeIs in various places r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D40677

--HG--
extra : moz-landing-system : lando
2019-08-06 20:19:41 +00:00
Jeff Muizelaar
bc8f976c10 Bug 1571837. Don't call FlushItem for hit test items. r=mstange
We already skip painting hit test items. We can do even better
by not including them in the recording at all.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 19:05:20 +00:00
Markus Stange
c33b29cfbb Bug 1571253 - Call mProfilerScreenshotGrabber.NotifyEmptyFrame() in the main place where no-op composites are noticed. r=mattwoodrow
There's another call inside Render() but that's usually too late.

Depends on D40558

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

--HG--
extra : moz-landing-system : lando
2019-08-04 20:37:28 +00:00
Markus Stange
901919b119 Bug 1571253 - Persist the layers damage region in mInvalidRegion if the frame has been aborted. r=mattwoodrow
An alternative approach, which I would have preferred, would be to keep the old
mClonedLayerTreeProperties around, so that future frames can compare to the
last non-aborted mClonedLayerTreeProperties. However, that doesn't work in the
current world because mClonedLayerTreeProperties->ComputeDifferences has side-
effects.

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

--HG--
extra : moz-landing-system : lando
2019-08-04 20:37:06 +00:00
Markus Stange
259d8d43ed Bug 1571253 - Refactor invalid region handling in LayerManagerComposite::UpdateAndRender without functional changes. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D40557

--HG--
extra : moz-landing-system : lando
2019-08-06 18:26:55 +00:00
Markus Stange
c3e76bb3af Bug 1570869 - Add some comments to WindowInfo and reorder members a little. r=nical
Depends on D40375

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

--HG--
extra : moz-landing-system : lando
2019-08-05 12:08:18 +00:00
Markus Stange
dd7b882fd0 Bug 1570869 - Inline FrameRenderingComplete into HandleFrameOneDoc. r=nical
Depends on D40374

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

--HG--
extra : moz-landing-system : lando
2019-08-05 12:09:46 +00:00
Markus Stange
d4aaf327fd Bug 1570869 - Fold mRender, mDocFramesSeen and mDocFrameCounts into PendingFrameInfo. r=nical
This makes it clear that these belong to a single frame and makes some assumptions explicit.
For example, in the old code, mDocFrameCounts.size() was the same as mPendingFrames.size()
when a pending frame was added, but then the sizes differed during rendering because a frame's
mDocFrameCount would be popped at the beginning of rendering while mPendingFrames would be
popped at the end of rendering.
This modification also makes some clearing of values unnecessary. A new frame always starts out
with cleared values for mDocFramesSeen and mFrameNeedsRender.

This patch also combines the two locks in HandleFrameOneDoc.

Depends on D40373

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

--HG--
extra : moz-landing-system : lando
2019-08-05 12:07:29 +00:00
Markus Stange
6ebb22a9d3 Bug 1570869 - Replace mRenderingCount with a boolean, to make it clear that we are only ever rendering at most one frame. r=nical
The only place that increments mRenderingCount, HandleFrameOneDoc, also synchronously calls FrameRenderingComplete
at the end of the function, which decrements mRenderingCount again. So it can never grow beyond 1.

Depends on D40372

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

--HG--
extra : moz-landing-system : lando
2019-08-05 12:02:38 +00:00
Markus Stange
d00dade81c Bug 1570869 - Remove mPendingCount in favor of an accessor. r=nical
Depends on D40371

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

--HG--
extra : moz-landing-system : lando
2019-08-05 11:59:35 +00:00
Markus Stange
17df58880c Bug 1570869 - Inline IncRenderingFrameCount into HandleFrame. r=sotaro
IncRenderingFrame only had one caller. Inlining it into HandleFrame makes it clearer
how the values in mWindowInfos are mutated and in what order calls happen.
This also renames HandleFrame to HandleFrameOneDoc, because we're expecting one call
per document before we actually trigger the render.

Depends on D40370

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

--HG--
extra : moz-landing-system : lando
2019-08-06 07:01:15 +00:00
Markus Stange
e36f7409a9 Bug 1570869 - Combine pending frame info in RenderThread's WindowInfo. r=nical
Differential Revision: https://phabricator.services.mozilla.com/D40370

--HG--
extra : moz-landing-system : lando
2019-08-05 11:54:31 +00:00
sotaro
88ebf5f1e4 Bug 1569724 - Do not use front TextureClient as next back buffer when PersistentBufferProviderShared::ClearCachedResources() is called r=nical
When PersistentBufferProviderShared::ClearCachedResources() is called, PersistentBufferProviderShared keeps front TextureClient. But TextureHost's read lock might be released by host side. Then TextureClient's read lock could not be used for checking if the TexutreClient is used by host side.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 00:43:09 +00:00
sotaro
bdf4e9bb80 Bug 1570592 - Remove AsyncImagePipelineManager::GetNextExternalImageId() r=nical
Differential Revision: https://phabricator.services.mozilla.com/D40168

--HG--
extra : moz-landing-system : lando
2019-08-05 11:51:57 +00:00
sotaro
b45b5a1f21 Bug 1571331 - Call ScheduleForcedGenerateFrame() in WebRenderBridgeParent::RecvScheduleComposite() r=nical
Differential Revision: https://phabricator.services.mozilla.com/D40580

--HG--
extra : moz-landing-system : lando
2019-08-05 12:21:31 +00:00
sotaro
6abb9c3532 Bug 1570593 - Do not use ResourceCache::is_image_active() with multiple documents r=gw
Differential Revision: https://phabricator.services.mozilla.com/D40169

--HG--
extra : moz-landing-system : lando
2019-08-04 21:40:13 +00:00
thomasmo
94cc4efcb3 Bug 1570125 - Create VR window via vrhost r=kip,mossop
This change creates the new export CreateVRWindow from vrhost.dll. This API
results in spawning a new Firefox window with the Firefox Reality 2D UI and
returns data needed for the host to interact with it. VRShMem is used to pass
data across process boundaries during this bootstrap process.

Additional tests are added to vrhost to be later converted to unittests.

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

--HG--
rename : gfx/vr/vrhost/vrhost.cpp => gfx/vr/vrhost/vrhosttest.cpp
extra : moz-landing-system : lando
2019-08-02 20:55:48 +00:00
Imanol Fernandez
0bf3c0b8ac Bug 1570671 - Stop VRManager timer tasks when the application goes to background. r=kip
Stop VRManager timer tasks when the application goes to background.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 22:13:56 +00:00
Jeff Gilbert
9d744e0fdb Bug 1562462 - ANGLE Cherry-pick: Fix occasional corruption of vertex textures in HD4600 GPUs for WebRender. r=gw
Differential Revision: https://phabricator.services.mozilla.com/D40354

--HG--
extra : moz-landing-system : lando
2019-08-02 01:56:17 +00:00
Jeff Gilbert
b29b969839 Bug 1562462 - Revert py-2to3 changes on py3 files from bug 1559975. NPOTB
Differential Revision: https://phabricator.services.mozilla.com/D40353

--HG--
extra : moz-landing-system : lando
2019-08-02 00:48:06 +00:00
Kearwood "Kip" Gilbert
5bd4ceaa42 Bug 1570075 - WebXR: Extend VRDisplayState and VRDisplayCapabilityFlags r=imanol
In order to support the WebXR implementation, VRDisplayState is being extended to enumerate the type of sessions a device supports (Inline, Immersive-VR, or Immersive-AR) and to report if the blend mode for AR would be additive or alpha blended).

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

--HG--
extra : moz-landing-system : lando
2019-07-31 11:46:48 +00:00
Lee Salzman
4f06706e18 Bug 1569950 - only partially clear WR glyph caches if it is not necessary to fully clear. r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D40361

--HG--
extra : moz-landing-system : lando
2019-08-02 15:11:47 +00:00
Dzmitry Malyshau
94761858ca Bug 1564118 - WR don't assume opaque on the lack of a clip task
those unwrap_or are mostly seen during the batching, where we should asssume that
the primitives are not clipped out and just unwrap() accordingly.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 14:48:46 +00:00
Dzmitry Malyshau
d109b775bd Bug 1570816 - Disallow nerest-sampled alpha textures in the shared cache in WR r=gw
Differential Revision: https://phabricator.services.mozilla.com/D40366

--HG--
extra : moz-landing-system : lando
2019-08-02 04:03:55 +00:00
Ciure Andrei
78c513784e Backed out changeset 9ab4ca317e30 (bug 1570671) for causing VRManager.cpp bustages CLOSED TREE 2019-08-02 03:16:18 +03:00
Imanol Fernandez
e2e9ce9c61 Bug 1570671 - Stop VRManager timer tasks when the application goes to background. r=kip
Stop VRManager timer tasks when the application goes to background.

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

--HG--
extra : moz-landing-system : lando
2019-08-01 17:12:16 +00:00
Dzmitry Malyshau
13c8d55d12 Bug 1570401 - WR early out on transformed ClipOut clips r=gw
Refactors get_clip_result_complex to cover ClipOut cases for rectangles as well
as Clip for non-repeated images.

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

--HG--
extra : moz-landing-system : lando
2019-08-01 02:07:21 +00:00
Timothy Nikkel
7184148ba0 Bug 1569215. In StackingContextHelper constructor pass parent scale to ChooseScale. r=jrmuizel
This might seem like we are including the parent scale twice because it is also included in mInheritedTransform but FrameLayerBuilder::ChooseScale only incorporates the passed in scale when combining it with a scale computed purely based on the local transform induced by this stacking context item.

This also fixes bug 1564698 and doesn't regress bug 1495163 (the only testcase I can still find for the regressing bug, bug 1415987).

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

--HG--
extra : moz-landing-system : lando
2019-08-01 02:03:19 +00:00
Barret Rennie
c32eee8ff0 Bug 1566915 - Do not ref count the CompositionRecorder r=mstange
Now that there is only ever a single handle to the `CompositionRecorder`, it no
longer needs to be ref-counted. And since the `WebRenderCompositionRecorder` is
owned exclusively by the `RenderThread`, it no longer needs a mutex. All the
code that resulted from having handles to the `WebRenderCompositionRecorder` on
two different threads is now no longer necessary.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 18:28:47 +00:00
Barret Rennie
629a2f0b5d Bug 1566915 - Do not keep a handle to the composition recorder in the CompositorBridgeParent r=mstange
Since we are not writing frames to disk from the `CompositorBridgeParent` in
the WebRender case, we do not actually need a handle to the
`(WebRender)CompositionRecorder` there. Instead, the `HostLayerManager` and
`RenderThread` can maintain exclusive handles to these objects. This will allow
us to use unique pointers for these objects and delete code in a follow up
patch.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 18:28:38 +00:00
Barret Rennie
4374f75f51 Bug 1566915 - Write collected frames from the composition recorder on the render thread r=kvark
On macOS, if we try to write the collected frames from the
`CompositorBridgeParent` we will not have an active GL context, resulting in a
crash. Writing the frames from the `RenderThread` solves this problem.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 18:28:34 +00:00
Barret Rennie
0ea4a2cbed Bug 1569258 - Ensure we have a CompositionRecorder before attempting to write frames r=kvark,mstange
Instead of blindly attempting to write frames to disk, we now ensure that the
`CompositionRecorder` exists. In the case where we have not allocated one,
calling `windowUtils.setCompositionRecording(false)` will instead print an
error message to the browser console.

In addition, attempting to call `windowUtils.setCompositionRecording(true)`
while a `CompositionRecorder` exists will also result in an error message.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 20:21:03 +00:00
Matt Woodrow
8a6d6da9ef Bug 1569974 - Don't try to deference an empty Maybe when starting CrossProcessPaint with a rect. r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D39964

--HG--
extra : moz-landing-system : lando
2019-07-31 19:01:05 +00:00
Jeff Muizelaar
201f9ee75b Bug 1570399. Revert the adjustment of the visible rect from bug 1565904. r=nical
This change was unintentional and may be responsible for the performance regression seen in
bug 1570256.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 17:47:26 +00:00
Jamie Nicol
18ee326474 Bug 1562316 - Fix emoji rendering on android webrender. r=lsalzman
ScaledFontFreeType::GetWRFontInstanceOptions() was neglecting to set
the FontInstanceFlags::EMBEDDED_BITMAPS flag. This was causing us to
always take the non-bitmap path when rasterizing the glyph, which
fails on android because emoji fonts are bitmap only. Setting this
flag causes glyphs to be rendered correctly on android webrender.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 15:43:52 +00:00
Joel Maher
ea680be1a5 Bug 1569916 - run reftest/crashtest on android-hw when gfx/* files change. r=ahal
run reftest/crashtest on android-hw when gfx/* files change.

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

--HG--
extra : moz-landing-system : lando
2019-07-31 13:43:59 +00:00
Dzmitry Malyshau
4d7909d785 Bug 1548339 - WR swizzle configuration of texture units r=gw
Allow the swizzle to be configurable with a texture binding. This is still experimental and needs to be tested well on all platforms.
Basic approach is the following:
  - WR device figures out how it can use BGRA and makes the texture cache format configurable at run-time. It tries to make the uploads to the shared texture cache pages to be done without any driver conversions, and without extra memory allocated.
  - it also reports the preferred input format for the images, which may be different from the texture cache format
  - if WR texture cache is asked to allocate a shared texture with a different (swizzled) format from the preferred, it associates the cache entry with a swizzle
  - the swizzle becomes a part of the `SourceTexture`, which affects batch splitting
  - when a texture reaches binding by GL device, it checks whether the current swizzle on this texture doesn't match the given one, and configures the texture sampling accordingly
  - we can't use blits with swizzling, so when that needs to happen we use `cs_copy` path, which is now mostly rewritten

The idea is that Gecko would ask WR for the preferred format and configure its image decoding to produce image data that doesn't require any swizzling.

The PR changes existing texture upload (and batching) paths. On Linux, if texture storage is available, we now use it and provide the data as RGBA, assuming no conversion by the driver. The swizzling kicks in when we sample this data in the shader. On Windows/Angle we use BGRA as an internal format for texture cache and expect Gecko to provide BGRA data, this should be unchanged.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 14:55:50 +00:00
Timothy Nikkel
e4f60aaea0 Bug 1565039. In PicturePrimitive::take_context do calculation in float in case the unclipped rect is too big for int. r=gw
The final clipped result should hopefully not overflow.

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

--HG--
extra : moz-landing-system : lando
2019-07-30 09:06:31 +00:00
Imanol Fernandez
1f32c478c3 Bug 1569622 - Call VRManager::StartFrame directly instead of using a PostTask on Android. r=kip,rbarker
Call VRManager::StartFrame directly instead of using a PostTask on Android.

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

--HG--
extra : moz-landing-system : lando
2019-07-30 00:11:37 +00:00
Lee Salzman
9a69d270c0 Bug 1569174 - disable embedded bitmaps if ClearType rendering mode is forced. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D39749

--HG--
extra : moz-landing-system : lando
2019-07-30 02:55:48 +00:00
Dzmitry Malyshau
3692691268 Bug 1569717 - Fix WR vertex textures to have the width of 1024 r=gw
Differential Revision: https://phabricator.services.mozilla.com/D39785

--HG--
extra : moz-landing-system : lando
2019-07-29 23:07:37 +00:00
Barret Rennie
7629463ab1 Bug 1569443 - Free composition recorder structures when freeing Renderer r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D39752

--HG--
extra : rebase_source : b6e51714655a99fc80ea034c598e44667d1ae1fb
extra : source : e7cba26781e9e2bf66f84d9c9f4aa507be6d25bf
2019-07-29 21:25:04 +00:00
Connor Brewster
44d6e0ec22 Bug 1569101 - Add red zone padding to built display list during deserialization r=kamidphish
Differential Revision: https://phabricator.services.mozilla.com/D39464

--HG--
extra : rebase_source : 40e6b4c96be31c27c0379bf5e458a7b71a3901d6
2019-07-29 00:33:11 +00:00
Cosmin Sabou
4fefee3bd7 Backed out changeset e7cba26781e9 (bug 1569443) for causing webrender bustages. CLOSED TREE 2019-07-30 01:04:49 +03:00
thomasmo
de6f69fb39 Bug 1565296 - Implement Command Line Handler for FxR on desktop r=mossop,Gijs
This change adds functionality for the new command line argument, --fxr. This
will be used to create a new, separate browser window for Firefox Reality on
desktop.

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

--HG--
extra : moz-landing-system : lando
2019-07-29 20:11:27 +00:00
Barret Rennie
bacd83c5c1 Bug 1569443 - Free composition recorder structures when freeing Renderer r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D39752

--HG--
extra : moz-landing-system : lando
2019-07-29 21:25:04 +00:00
thomasmo
a4f1b3fdcd Bug 1563233 - Update VRManager to consume VRShMem r=kip,daoshengmu
This change replaces and removes code in VRManager that was refactored into the
new VRShMem class.

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

--HG--
extra : moz-landing-system : lando
2019-07-29 14:30:54 +00:00
shindli
2311ab23b6 Backed out changeset bdb7f8baac7e (bug 1569101) for causing wrench bustages in /builds/worker/workspace/build/tooltool.tt 2019-07-29 04:53:11 +03:00
Connor Brewster
f74585e5e5 Bug 1569101 - Add red zone padding to built display list during deserialization r=kamidphish
Differential Revision: https://phabricator.services.mozilla.com/D39464

--HG--
extra : moz-landing-system : lando
2019-07-29 00:33:11 +00:00