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
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
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
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
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
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
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
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
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
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