Add an observer to restart the PVideoBridge connection when GPU process
restarts.
Differential Revision: https://phabricator.services.mozilla.com/D50403
--HG--
extra : moz-landing-system : lando
Combine sVideoBridgeToParentProcess and sVideoBridgeToGPUProcess into one
sVideoBridge. Each producing process, GPU or RDD, is only ever started with one
VideoBridgeChild endpoint. This is enough to get RemoteVideoDecoders in RDD
process to start using GPU memory to send video to compositor over PVideoBridge.
Differential Revision: https://phabricator.services.mozilla.com/D50402
--HG--
extra : moz-landing-system : lando
This implementation is off by default (behind gfx.webrender.compositor) until
various bugs and inefficiencies are fixed. See bug 1592016.
Differential Revision: https://phabricator.services.mozilla.com/D50726
--HG--
extra : moz-landing-system : lando
This allows us to somewhat cheaply swap out the entire set of layers.
It also means that clearing the array of layers no longer has quadratic complexity;
in the past, you would do this by calling RemoveLayer once per layer, and RemoveLayer
does a linear scan through the array.
Differential Revision: https://phabricator.services.mozilla.com/D50725
--HG--
extra : moz-landing-system : lando
This change makes several small changes:
- Update default window size to 16:9 ratio for common fullscreen video size
- Update license URL
- Fix spacing of settings icon in nav bar
- make the window have Private Browsing behavior by default
Differential Revision: https://phabricator.services.mozilla.com/D50843
--HG--
extra : moz-landing-system : lando
This implementation is off by default (behind gfx.webrender.compositor) until
various bugs and inefficiencies are fixed. See bug 1592016.
Differential Revision: https://phabricator.services.mozilla.com/D50726
--HG--
extra : moz-landing-system : lando
This allows us to somewhat cheaply swap out the entire set of layers.
It also means that clearing the array of layers no longer has quadratic complexity;
in the past, you would do this by calling RemoveLayer once per layer, and RemoveLayer
does a linear scan through the array.
Differential Revision: https://phabricator.services.mozilla.com/D50725
--HG--
extra : moz-landing-system : lando
This change makes opaqueness a boolean per layer again. The opaque region is
currently only used by the temporary WebRender code; the future WebRender code
won't use it. Removing this support simplifies the code and makes it easier to
implement clipping.
Differential Revision: https://phabricator.services.mozilla.com/D50722
--HG--
extra : moz-landing-system : lando
This prevents stale indices into the prim visibility scratch
buffer being reused on subsequent frames, which can cause various
unexpected code paths to be hit.
Differential Revision: https://phabricator.services.mozilla.com/D50891
--HG--
extra : moz-landing-system : lando
The recorder can still contain UnscaledFonts, but they are never removed
currently, so we can't wait for them and they will be re-recorded safely anyway.
Depends on D49757
Differential Revision: https://phabricator.services.mozilla.com/D49758
--HG--
extra : moz-landing-system : lando
The patch permits to resize compositor window's size after ::SetParent() call to prevent a conflict between ::SetParent() and ::SetWindowPos(). Then it triggers a composite after SetParent() call to resize compositor window correctly.
Differential Revision: https://phabricator.services.mozilla.com/D49884
--HG--
extra : moz-landing-system : lando
When JS is paused, VRService will automatically shutdown because the timer is not updated,
we used to create a new VRDisplay to JS. However, the page is still using the older VRDisplay,
so it can't get the newest VRDisplayInfo status. We should exit presentation and
apply the VRDisplayInfo status to the original VRDisplay instead of creating new one.
Besides, we also need to release the VR screen buffer after exiting the immersive mode to avoid eglMakeCurrent error.
Differential Revision: https://phabricator.services.mozilla.com/D50558
--HG--
extra : moz-landing-system : lando
This passes the existing dirty rect for a picture cache update
through the native compositor interface, allowing compositors
to only update a sub-rect of a tile.
Also update the example to pass dirty rect to DirectComposition,
and add debug drawing for compositor redraw region.
Differential Revision: https://phabricator.services.mozilla.com/D50767
--HG--
extra : moz-landing-system : lando
Platform differences between DirectComposition and CoreAnimation
mean that WR needs to bind the FBO ID that the underlying platform
returns as part of the surface binding operation.
Differential Revision: https://phabricator.services.mozilla.com/D50760
--HG--
extra : moz-landing-system : lando
This patch is a small refactor of the public and internal structures
for options related to partial present and native compositing. It
doesn't contain any functional changes.
It adds a field to the native compositing setup to allow clients to
express whether dirty rect updates are supported when native compositing
is enabled (not currently used but will be enabled soon).
It also removes the partial present config options, and makes them
part of the default / draw compositing mode.
Differential Revision: https://phabricator.services.mozilla.com/D50521
--HG--
extra : moz-landing-system : lando
Update VRManager VRShmem if it's not ready after calling OpenShmem on Android
Differential Revision: https://phabricator.services.mozilla.com/D50820
--HG--
extra : moz-landing-system : lando
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
--HG--
extra : moz-landing-system : lando
With this patch, picture cache slices are constructed each time
a new scroll root is established. This reduces rasterization
cost on pages that have large fixed position elements, and pages
that contain multiple scroll roots.
Differential Revision: https://phabricator.services.mozilla.com/D50026
--HG--
extra : moz-landing-system : lando
This patch was largely written by Sotaro.
This patch also adds an off-by-default pref gfx.webrender.compositor that currently does nothing.
Differential Revision: https://phabricator.services.mozilla.com/D50721
--HG--
extra : moz-landing-system : lando
VRManager only be accessible in the parent or GPU process. So, in the tab process, isPresenting() will always return false. In WebVR immersive mode, we need to skip layer painting and don't need to wait for painting because the compositing is already done in WebGL.
Differential Revision: https://phabricator.services.mozilla.com/D48119
--HG--
extra : moz-landing-system : lando
This ensures the coordinates of tap events are adjusted as well.
Depends on D50361
Differential Revision: https://phabricator.services.mozilla.com/D50362
--HG--
extra : moz-landing-system : lando
The offset is applied (added) during rendering; it needs to be un-applied
(subtracted) during hit testing.
Depends on D50360
Differential Revision: https://phabricator.services.mozilla.com/D50361
--HG--
extra : moz-landing-system : lando
This issue happens when VR/GPU haven't connected with the parent process via IPC protocol, and we are trying to access its IPC Child when it is still null. It is possible to be happened when GPU/VR process is killed/shutdown, and we are trying to launch a new VR process. We need to check these status before completing our VR process's launch.
Differential Revision: https://phabricator.services.mozilla.com/D46540
--HG--
extra : moz-landing-system : lando
Please note that it is the first reformat with clang-format 9
I only saw a fix in the .mm file
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D49056
--HG--
extra : moz-landing-system : lando
When we are not scrolling or animating it can be normal for there to be a long pause between frames, in which case highlighting the FPS counter in the profiler is distracting.
Depends on D49619
Differential Revision: https://phabricator.services.mozilla.com/D49620
--HG--
extra : moz-landing-system : lando
Forwarding keyboard focus/blur events to VR browser that runs at another process. We will need to set these events in VR shmem, then VR host can receive these states from other process.
Differential Revision: https://phabricator.services.mozilla.com/D48903
--HG--
extra : moz-landing-system : lando
Bug 1587521 - Enable FullScreen in FxR for Desktop
This change enables Fullscreen functionality in the UI for Firefox Reality for Desktop. On Fullscreen, the window (rather than the desktop) is taken over, and it is up to the host to render the contents as fullscreen.
To mitigate the impact on Desktop's implementation, browser-fullScreenAndPointerLock.js is forked and removes the dependencies on browser.js. These two files will be rationalized at a later time.
Differential Revision: https://phabricator.services.mozilla.com/D48913
--HG--
rename : browser/base/content/browser-fullScreenAndPointerLock.js => browser/fxr/content/fxr-fullScreen.js
extra : moz-landing-system : lando
AverageIntProfileCounter records the average and maximum of sampled interger values over time slices of half a second. Using it instead of IntProfileCounter in some places will make it easier to notice single-frame spikes.
Differential Revision: https://phabricator.services.mozilla.com/D49127
--HG--
extra : moz-landing-system : lando
Adds support for creating and using a PSandboxTesting actor in the GPU process.
Differential Revision: https://phabricator.services.mozilla.com/D42386
--HG--
extra : moz-landing-system : lando
Cosmos changes their controller binding of grip/x/y buttons, so we need to give an update.
Differential Revision: https://phabricator.services.mozilla.com/D49502
--HG--
extra : moz-landing-system : lando
wl_egl_window size must exactly march GL rendering pipeline setting.
Compositor and widget can have different window sizes during window resize when widget
is resized faster than layout can render. Firefox window is rendered misplaced then
and it's "jumping" as layout size is behind toolkit size.
Differential Revision: https://phabricator.services.mozilla.com/D49136
--HG--
extra : moz-landing-system : lando
wl_egl_window size must exactly march GL rendering pipeline setting.
Compositor and widget can have different window sizes during window resize when widget
is resized faster than layout can render. Firefox window is rendered misplaced then
and it's "jumping" as layout size is behind toolkit size.
Differential Revision: https://phabricator.services.mozilla.com/D49136
--HG--
extra : moz-landing-system : lando
From https://drafts.csswg.org/css-overflow/#overflow-propagation:
> UAs must apply the overflow-* values set on the root element to the viewport.
> However, when the root element is an [HTML] html element (including XML syntax
> for HTML) whose overflow value is visible (in both axes), and that element has
> a body element as a child, user agents must instead apply the overflow-*
> values of the first such child element to the viewport. The element from which
> the value is propagated must then have a used overflow value of visible.
This was out of sync with Document::IsScrollingElement, which implements the
right thing.
Differential Revision: https://phabricator.services.mozilla.com/D49196
--HG--
extra : moz-landing-system : lando
From https://drafts.csswg.org/css-overflow/#overflow-propagation:
> UAs must apply the overflow-* values set on the root element to the viewport.
> However, when the root element is an [HTML] html element (including XML syntax
> for HTML) whose overflow value is visible (in both axes), and that element has
> a body element as a child, user agents must instead apply the overflow-*
> values of the first such child element to the viewport. The element from which
> the value is propagated must then have a used overflow value of visible.
This was out of sync with Document::IsScrollingElement, which implements the
right thing.
Differential Revision: https://phabricator.services.mozilla.com/D49196
--HG--
extra : moz-landing-system : lando
Instead of allocating a tile surface from the texture cache during
the tile post_update method, this is now deferred until the
take_context method of picture.
This will allow a simple CPU occlusion culling pass to run after
all the tile cache dependency updates (when the visible tiles and
rects are know), but before the surfaces are allocated. In this way,
we will be able to skip allocating, rasterizing and compositing
any tiles that are eliminated by the occlusion culling test.
Differential Revision: https://phabricator.services.mozilla.com/D48795
--HG--
extra : moz-landing-system : lando
We could put this change itself behind a pref too, if we considered that worth
it. But probably not so.
Differential Revision: https://phabricator.services.mozilla.com/D48010
--HG--
extra : moz-landing-system : lando
This also reduces the size of BlobItemData which will give us
some free performance on SVGs that have a lot of items by reducing
our working set size.
Differential Revision: https://phabricator.services.mozilla.com/D49023
--HG--
extra : moz-landing-system : lando
Notify VRActiveStatus after a the VREventObserver is created to prevent the VRManagerParent::GetVRActiveStatus race condition.
Call VRManager::Shutdown() when the app goes to background instead of calling it in the foreground event due to the inactivity timer.
Differential Revision: https://phabricator.services.mozilla.com/D48678
--HG--
extra : moz-landing-system : lando
This patch adds a notion of "fully transparent" image in the resource cache.
These are not uploaded in the texture cache and image requests return the
necessary information to allow the frame building code to skip emitting
primitives accordingly.
Differential Revision: https://phabricator.services.mozilla.com/D47878
--HG--
extra : moz-landing-system : lando
Since Bug 1570879, SwapChain is created with alpha at first, then the SwapChain is typically re-created at first RenderCompositorANGLE::BeginFrame() calle, since non Glass window is common since Windows 10. The re-creation is redundant.
Differential Revision: https://phabricator.services.mozilla.com/D48800
--HG--
extra : moz-landing-system : lando
On Android, decoded buffers need to be send back to MediaCodec in order to be
rendered and/or recycled. The current mechanism introduced in bug 1299068 only
works for playback(VideoData/VideoSink) but not WebRTC(VideoFrame/VideoOutput).
Move the callback to SurfaceTextureImage because VideoData and VideoFrame both
own that when using MediaCodec, and move the notification to VideoFrameContainer
for both VideoSink and VideoOutput pass frames there for compositing.
Differential Revision: https://phabricator.services.mozilla.com/D45771
--HG--
extra : moz-landing-system : lando
In the future mInvalidRect and some other state should move out of DIGroup
and into a non-persistant struct that's only used during Group building.
This will allow us to completely avoid errors like this.
Differential Revision: https://phabricator.services.mozilla.com/D48706
--HG--
extra : moz-landing-system : lando
IDCompositionDevice is replaced by IDCompositionDevice2. It is necessary for IDCompositionDeviceDebug usage. And for using IDCompositionDevice2, _WIN32_WINNT and NTDDI_VERSION is updated from Windows 8 to Windows 8.1.
Workaround MinGW build failure.
Differential Revision: https://phabricator.services.mozilla.com/D47742
--HG--
extra : moz-landing-system : lando
The previous patch fixed the bug in the non-picture caching code
path, so we can re-enable the preference now.
Differential Revision: https://phabricator.services.mozilla.com/D48639
--HG--
extra : moz-landing-system : lando
When uploading texture data with a PBO we currently ensure the PBO
is the size of `(height - 1) * stride + (width * bpp)`, ie the final row
only contains the width's worth of data, not the stride. This should
be okay, and works fine on other implementations, but the android
emulator thinks it is invalid and emits a GL_INVALID_OPERATION error
in the glTexSubImage* call. To avoid this, ensure that the PBO is the
full `height * stride` size.
Differential Revision: https://phabricator.services.mozilla.com/D48541
--HG--
extra : moz-landing-system : lando
The framebuffer clear was accidentally removed due to a rebase
error. We need to clear the framebuffer (and z) here when the
non-picture caching path is active.
Differential Revision: https://phabricator.services.mozilla.com/D48600
--HG--
extra : moz-landing-system : lando
What we actually care about here is whether itemRect is empty bceause that's
the what we'll use for the actual surface size.
Differential Revision: https://phabricator.services.mozilla.com/D48548
--HG--
extra : moz-landing-system : lando
When high contrast mode is enabled, title bar is drawn as transparent and on-client area rendering by DWM is shown. But when compositor window in GPU process is used, the on-client area rendering was not shown. To address the proboem, window needs to be cleard as transparent and SwapChain of compositor window needs to be DXGI_ALPHA_MODE_PREMULTIPLIED.
WinCompositorWidget::mTransparencyMode is changed to atomic, since it is accessed from compositor thread and render thread.
Differential Revision: https://phabricator.services.mozilla.com/D48302
--HG--
extra : moz-landing-system : lando
The CanvasChild must be in the process of being destroyed at this point anyway.
Differential Revision: https://phabricator.services.mozilla.com/D47443
--HG--
extra : moz-landing-system : lando
When user adjusts the video playback rate, which might cause we sending images in a speed that is faster than the speend we composite images.
In this situation, the frame dropping actually won't cause any visual defect and we also don't want to report this frame dropping to user, because it's not caused by system overloading, it's just our compositor doesn't support compositing images in such a high rate.
Therefore, we should check if the dropped images are caused by system overload or high update rate, and only report the former to user.
Differential Revision: https://phabricator.services.mozilla.com/D46236
--HG--
extra : moz-landing-system : lando
Populating them is hooked up for non-WebRender, with a comment outlining
possible implementation strategies for WebRender.
Differential Revision: https://phabricator.services.mozilla.com/D48384
--HG--
extra : moz-landing-system : lando
It's still only used on Android, but keeping it and all code that interacts
with it inside an #ifdef is too much trouble for a tiny amount of space
saving.
Differential Revision: https://phabricator.services.mozilla.com/D48369
--HG--
extra : moz-landing-system : lando
This makes things better especially when the bounds of the combined blob
is changing but the bound of the separate ones are not.
The current implementation is a bit ugly, but it's simple and
can be cleaned up in the cleanups I have in mind for the future.
Differential Revision: https://phabricator.services.mozilla.com/D47983
--HG--
extra : moz-landing-system : lando
The signatures were updated in the previous patch to hand us the raw,
uncopied buffers. This just adjusts the callsites to match.
Differential Revision: https://phabricator.services.mozilla.com/D34653
--HG--
extra : moz-landing-system : lando
Bug 1460357 disabled AVX because gcc was generating unaligned instructions. But clang doesn't seem
to do that.
Differential Revision: https://phabricator.services.mozilla.com/D48072
--HG--
extra : moz-landing-system : lando
Promote clear primitives to be picture cache slices that can
be drawn during the composite step. Without this, the clear
primitive is not correct since it only operates on the slice
it is assigned to, not the entire background before it.
Differential Revision: https://phabricator.services.mozilla.com/D48139
--HG--
extra : moz-landing-system : lando
We need to detect this code path in renderer, and call the
legacy draw_color_target method.
Differential Revision: https://phabricator.services.mozilla.com/D48105
--HG--
extra : moz-landing-system : lando
Instead of checking whether the bounds of the clipped
image has changed just check whether our clipped bounds
have changed. This simplifies the code and avoids
a bunch of extra invalidations.
Differential Revision: https://phabricator.services.mozilla.com/D47971
--HG--
extra : moz-landing-system : lando
This can happen if we need to use gfxFontGroup::GetDefaultFont() during stylo traversal,
but we initially failed to create the required font because the font list is stale.
In this case, use a "last-resort" default font entry as a stopgap until the font list
update is completed.
Differential Revision: https://phabricator.services.mozilla.com/D47637
--HG--
extra : moz-landing-system : lando
Previously, picture cache tiles were added to normal batches, and drawn
via the brush_image shader. Since all content is now in picture cache
tiles, we can instead draw the tiles via a separate code path. The tiles
for all picture caches are collected into a single composite config, that
is stored in the Frame structure. These two changes provide a number of
advantages:
* The composite shader is very simple - it doesn't need to deal with
transforms, anti-aliasing, repetition etc.
* Since we create the tile batches in render(), rather than in the
backend, we can take advantage of information not available until
the render() call. For example, Gecko will provide information here
when the partial presentation rects need to be reset. This will be
used to enable partial presentation parameters on Windows.
* In future, we can access this list of tiles to be composited, and use
them to configure the OS compositor integration, and hand the tiles
directly to the OS compositor.
* In future, we can apply global optimizations to the set of picture
cache tiles (e.g. occlude background tiles on CPU to skip paying
the z-reject cost of drawing them).
* In future, we can take advantage of the simpler composite path
for software rasterizer implementations.
Differential Revision: https://phabricator.services.mozilla.com/D47724
--HG--
extra : moz-landing-system : lando
This was added as part of an intermediate step to blob
recoordination. It's not used anymore.
Differential Revision: https://phabricator.services.mozilla.com/D47354
--HG--
extra : moz-landing-system : lando
Before this patch, we only considered the primary screen when deciding
whether or not WebRender should be enabled. This is problematic for
Intel users where we don't want to turn on WebRender for large screens;
several small screens are just as bad as one large screen. Now we sum
the pixel count for all the screens when making this decision.
Differential Revision: https://phabricator.services.mozilla.com/D46066
--HG--
extra : moz-landing-system : lando
This was added as part of an intermediate step to blob
recoordination. It's not used anymore.
Differential Revision: https://phabricator.services.mozilla.com/D47354
--HG--
extra : moz-landing-system : lando
Now that we're painting based on the visible area we need to make sure that we
update the blob when ever the visible area changes. We'll do this by
unconditionally setting the visible area.
Differential Revision: https://phabricator.services.mozilla.com/D47335
--HG--
extra : moz-landing-system : lando
These variants perform significantly faster than the C implementations
according to local testing and that in treeherder. Image decoding is as
much as 40% faster in the most simple cases (solid green PNG image).
Differential Revision: https://phabricator.services.mozilla.com/D46446
--HG--
extra : moz-landing-system : lando
Some image decoders (e.g. PNG) may have a native representation of the
data as RGB, and do not have accelerated methods to transform from RGB
to RGBX/BGRX. Exposing this as part of the swizzle/premultiply methods
allows us to write accelerated versions ourselves in a later patch in
this series.
Differential Revision: https://phabricator.services.mozilla.com/D46445
--HG--
extra : moz-landing-system : lando
The image decoders produce surfaces row by row, so a variant to get a
function pointer to perform swizzle/premultiply operations makes more
ergonomic sense.
Differential Revision: https://phabricator.services.mozilla.com/D46444
--HG--
extra : moz-landing-system : lando
In addition, make sure the descriptor size stays in sync with the visible rect's size.
The descriptor's size stored in the resource cache is pretty much obsolete now, we should be able to clean it up and remove it.
Differential Revision: https://phabricator.services.mozilla.com/D46803
--HG--
extra : moz-landing-system : lando
In addition, make sure the descriptor size stays in sync with the visible rect's size.
The descriptor's size stored in the resource cache is pretty much obsolete now, we should be able to clean it up and remove it.
Differential Revision: https://phabricator.services.mozilla.com/D46803
--HG--
extra : moz-landing-system : lando
When user adjusts the video playback rate, which might cause we sending images in a speed that is faster than the speend we composite images.
In this situation, the frame dropping actually won't cause any visual defect and we also don't want to report this frame dropping to user, because it's not caused by system overloading, it's just our compositor doesn't support compositing images in such a high rate.
Therefore, we should check if the dropped images are caused by system overload or high update rate, and only report the former to user.
Differential Revision: https://phabricator.services.mozilla.com/D46236
--HG--
extra : moz-landing-system : lando
This moves the origin of fallback blobs back to the top left of their display
item bounds. This is what they were before the patches in bug 1568227 and makes
more sense because there's not necessarily a reference frame above the fallback
frame which means that the coordinates of the display item can change without
us wanting to invalidate the interior.
Differential Revision: https://phabricator.services.mozilla.com/D47275
--HG--
extra : moz-landing-system : lando
This removes a lot of old cruft in thebes to instantiate Cairo scaled fonts.
Instead, we only instantiate the Cairo scaled font inside Moz2D when we actually
need it for DrawTargetCairo. This thus gets rid of the duplicated code we had
inside both Moz2D and thebes to deal with Cairo scaled fonts.
Differential Revision: https://phabricator.services.mozilla.com/D47297
--HG--
extra : moz-landing-system : lando
Once this patch lands, all content drawn by WebRender is drawn into
a picture cache surface.
This will incur some extra GPU memory overhead since there are extra
GPU texture buffers. Much of this can be reduced by adding a couple
of simple optimizations in future to detect tiles that are solid
colors only.
With this change, we'll now be able to provide exact dirty rects for
the entire screen without any hacks, and start the work to draw into
OS compositor surfaces directly.
Differential Revision: https://phabricator.services.mozilla.com/D47395
--HG--
extra : moz-landing-system : lando
In addition, make sure the descriptor size stays in sync with the visible rect's size.
The descriptor's size stored in the resource cache is pretty much obsolete now, we should be able to clean it up and remove it.
Differential Revision: https://phabricator.services.mozilla.com/D46803
--HG--
extra : moz-landing-system : lando
This moves the origin of fallback blobs back to the top left of their display
item bounds. This is what they were before the patches in bug 1568227 and makes
more sense because there's not necessarily a reference frame above the fallback
frame which means that the coordinates of the display item can change without
us wanting to invalidate the interior.
Differential Revision: https://phabricator.services.mozilla.com/D47275
--HG--
extra : moz-landing-system : lando
Once this patch lands, all content drawn by WebRender is drawn into
a picture cache surface.
This will incur some extra GPU memory overhead since there are extra
GPU texture buffers. Much of this can be reduced by adding a couple
of simple optimizations in future to detect tiles that are solid
colors only.
With this change, we'll now be able to provide exact dirty rects for
the entire screen without any hacks, and start the work to draw into
OS compositor surfaces directly.
Differential Revision: https://phabricator.services.mozilla.com/D47395
--HG--
extra : moz-landing-system : lando
Once this patch lands, all content drawn by WebRender is drawn into
a picture cache surface.
This will incur some extra GPU memory overhead since there are extra
GPU texture buffers. Much of this can be reduced by adding a couple
of simple optimizations in future to detect tiles that are solid
colors only.
With this change, we'll now be able to provide exact dirty rects for
the entire screen without any hacks, and start the work to draw into
OS compositor surfaces directly.
Differential Revision: https://phabricator.services.mozilla.com/D47395
--HG--
extra : moz-landing-system : lando
This moves the origin of fallback blobs back to the top left of their display
item bounds. This is what they were before the patches in bug 1568227 and makes
more sense because there's not necessarily a reference frame above the fallback
frame which means that the coordinates of the display item can change without
us wanting to invalidate the interior.
Differential Revision: https://phabricator.services.mozilla.com/D47275
--HG--
extra : moz-landing-system : lando
This moves the origin of fallback blobs back to the top left of their display
item bounds. This is what they were before the patches in bug 1568227 and makes
more sense because there's not necessarily a reference frame above the fallback
frame which means that the coordinates of the display item can change without
us wanting to invalidate the interior.
Differential Revision: https://phabricator.services.mozilla.com/D47275
--HG--
extra : moz-landing-system : lando
This layer structure can still occur in cases where we place the RCD-RSF
scroll metadata on the root layer as a fallback.
Differential Revision: https://phabricator.services.mozilla.com/D47655
--HG--
extra : moz-landing-system : lando
The signatures were updated in the previous patch to hand us the raw,
uncopied buffers. This just adjusts the callsites to match.
Differential Revision: https://phabricator.services.mozilla.com/D34653
--HG--
extra : moz-landing-system : lando
On Android, decoded buffers need to be send back to MediaCodec in order to be
rendered and/or recycled. The current mechanism introduced in bug 1299068 only
works for playback(VideoData/VideoSink) but not WebRTC(VideoFrame/VideoOutput).
Move the callback to SurfaceTextureImage because VideoData and VideoFrame both
own that when using MediaCodec, and move the notification to VideoFrameContainer
for both VideoSink and VideoOutput pass frames there for compositing.
Differential Revision: https://phabricator.services.mozilla.com/D45771
--HG--
extra : moz-landing-system : lando
To support NDK r20, wrench needs to be built with a more recent, upstream
(though still unpublished) version of cargo-apk. This has some consequences
which have been adjusted for:
* Gradle is no longer required to build wrench.
* The output apk file paths have changed.
* The apks are now signed automatically.
* The default activity name has changed.
* Android permissions must be explicitly requested.
* We must ensure winit is built with a matching version of android_glue.
Differential Revision: https://phabricator.services.mozilla.com/D47129
--HG--
extra : moz-landing-system : lando
Previously, the setup_picture_caching function was hard coded
to support only a very specific shape of display list. With this
change, flags are added to PrimitiveCluster that can specify
if a picture cache slice should be created before / after this
cluster when picture caching is set up.
The usage of these flags in this patch matches the old behaviour,
so should not have any functional effect.
However, in future we will make use of this functionality to
create picture slices for a number of different use cases, such as:
* Creating cache tiles for the UI.
* Slicing the scene where there are video elements, in order to
allow these to be composited directly by the OS. This may also
apply to WebGL and/or canvas elements.
* Slicing the scene when there is a very large fixed position
background image or other element, to avoid invalidating the
entire tile cache each frame.
Differential Revision: https://phabricator.services.mozilla.com/D46125
--HG--
extra : moz-landing-system : lando
To avoid duplicating information, the comment about lock ordering in
APZCTreeManager.h is also updated to point to the documentation.
Differential Revision: https://phabricator.services.mozilla.com/D47146
--HG--
extra : moz-landing-system : lando
This change is a continuation of Part 1 (Bug 1570128), where the 2D content rendered by Firefox for Firefox Reality on Desktop is marshalled through VRHost so that it can be presented in a VR environment.
A new class, FxrOutputHandler, is created to manage creating a sharable texture, sharing it through VRShMem, and updating it when content updates. This class updates content with both WebRender and conventional rendering output.
This initial iteration of FxrOutputHandler does not have synchronization between reading and writing this shared texture across processes. A subsequent fix (Bug 1581881) is pending, which will reuse WebVR code to manage writing to and reading from a pool of textures.
This also presents issues with rendering protected media, so an additional class, FxrWindowManager, is created to manage all windows created for Firefox Reality on Desktop so that it can inform whether or not protected media can be presented.
The automated manual tests in vrhosttest.cpp now show the real shared texture handle rather than a fake value, which shows that marshaling succeeded.
Differential Revision: https://phabricator.services.mozilla.com/D46179
--HG--
extra : moz-landing-system : lando
Before Bug 1570869, new frame was generated if WR does not have a pending frame build task. But since Bug 1570869 fix, there is a case that new frame generation does not happen even when WR does not have a frame build task.
Differential Revision: https://phabricator.services.mozilla.com/D47045
--HG--
extra : moz-landing-system : lando
Move DeviceReset handling before the assert. It is OK, since RendererOGL instance is not re-used after the DeviceReset. It is replaced by a new RendererOGL.
Differential Revision: https://phabricator.services.mozilla.com/D47036
--HG--
extra : moz-landing-system : lando
Previously, the setup_picture_caching function was hard coded
to support only a very specific shape of display list. With this
change, flags are added to PrimitiveCluster that can specify
if a picture cache slice should be created before / after this
cluster when picture caching is set up.
The usage of these flags in this patch matches the old behaviour,
so should not have any functional effect.
However, in future we will make use of this functionality to
create picture slices for a number of different use cases, such as:
* Creating cache tiles for the UI.
* Slicing the scene where there are video elements, in order to
allow these to be composited directly by the OS. This may also
apply to WebGL and/or canvas elements.
* Slicing the scene when there is a very large fixed position
background image or other element, to avoid invalidating the
entire tile cache each frame.
Differential Revision: https://phabricator.services.mozilla.com/D46125
--HG--
extra : moz-landing-system : lando
This change is a continuation of Part 1 (Bug 1570128), where the 2D content rendered by Firefox for Firefox Reality on Desktop is marshalled through VRHost so that it can be presented in a VR environment.
A new class, FxrOutputHandler, is created to manage creating a sharable texture, sharing it through VRShMem, and updating it when content updates. This class updates content with both WebRender and conventional rendering output.
This initial iteration of FxrOutputHandler does not have synchronization between reading and writing this shared texture across processes. A subsequent fix (Bug 1581881) is pending, which will reuse WebVR code to manage writing to and reading from a pool of textures.
This also presents issues with rendering protected media, so an additional class, FxrWindowManager, is created to manage all windows created for Firefox Reality on Desktop so that it can inform whether or not protected media can be presented.
The automated manual tests in vrhosttest.cpp now show the real shared texture handle rather than a fake value, which shows that marshaling succeeded.
Differential Revision: https://phabricator.services.mozilla.com/D46179
--HG--
extra : moz-landing-system : lando
Still getting some crash reports on nightly with a 1MB stack. Let's try one more time
with 2MB just to see if we can eliminate those. If this fails, then we may need to consider
more drastic approaches like disabling OMTP in this case.
Differential Revision: https://phabricator.services.mozilla.com/D47080
--HG--
extra : moz-landing-system : lando
This approach does have some stacking issues. The way to fix this would
be to instrument the brush_image shader rather than adding debug rects.
Something like: #ifdef WR_FEATURE_SFW frag.color = vec4(0,1,1,1); #endif
That's slightly more involved though, so I'm going to leave it for now.
Differential Revision: https://phabricator.services.mozilla.com/D47155
--HG--
extra : moz-landing-system : lando