This improves the DisplayList Mutate Talos test by about 5% on windows, as well as numerous smaller improvements on DisplayList heavy tasks.
MozReview-Commit-ID: tlEtPjqWI4
Currently, we use a simple merging algorithm, because the more
complicated ones didn't work.
This code won't actually be used until we do blob image invalidation
in a follow up.
MozReview-Commit-ID: Q2Em3QC195
The shared memory handle reporting has been generalized to be an
external handle reporting. This is used for both shared memory, and for
volatile memory (on Android.) This will allow us to have a better sense
of just how many handles are being used by images on Android.
Additionally we were not properly reporting forced heap allocated
memory, if we were putting animated frames on the heap. This is because
we used SourceSurfaceAlignedRawData without implementing
AddSizeOfExcludingThis.
image.mem.volatile.min_threshold_kb is the minimum buffer allocation for
an image frame in KB before it will use volatile memory. If it is less
than it will use the heap. This only is set to > 0 on Android.
image.mem.animated.use_heap forces image frames to use the heap if it is
for an animated image. This is only enabled for Android, and was
previously a compile time option also for Android.
This makes it possible to implement nsDisplayBlend blob image invalidation.
It currently only includes an implementation for Skia and DrawTargetRecording.
All other backends will crash when used.
MozReview-Commit-ID: 2GhdDxi4jHG
This commit introduces a lock on each FilterNodeSoftware around the cached surface.
This lock must be acquired whenever the cached surface is accessed. Currently this
is when the Filter is invalidated or painted.
When painting we only hold the cache lock when determining if we need to compute
a new surface, and after we have computed that new surface. This allows another
thread that may be painting that filter node at a different rect to not contend
on the cache. This is just theoretical though as DrawTargetTiled doesn't clamp
the source rect of the Filter command to the tile rect.
MozReview-Commit-ID: KFVZ35e1czB
--HG--
extra : rebase_source : a22918df80a24fad216a834a5737249cab570f08
This is a just a back out of changeset 6882857e1bb5.
MozReview-Commit-ID: 9Z6iEHl3eAy
--HG--
extra : rebase_source : 3d091c72a6e589e702d90ffe6800e131b009604b
Add a command CreateClippedDrawTarget to DrawTarget, which takes the
max required size and a transform between this draw target and the one
to be created. The created draw target may have its size clipped to
the size of this draw target, transformed to the new target's
space. This means that the new surface will be large enough so
that it is rendered to this draw target correctly, but not necessarily
any larger.
Usually this will just create a draw target of the requested size, for
simplicity. However, when replaying a recorded draw target we do clip
the size to the base draw target's size. This is done using a
DrawTargetTiled, so when applying the mask in PopLayer, we must take
the SourceSurface's offset in to account.
MozReview-Commit-ID: 89ONElphzLu
--HG--
extra : rebase_source : 7eebeb66a2686a7b6f4ade36f3004ebb06abc2fe
Fix the DrawTargetTiled::mRect initialization, and expose through the
virtual function GetRect(). Make SnapshotTiled::GetDataSurface()
allocate a surface the size of this rect, rather the XMost and
YMost. Callers of SourceSurface::GetDataSurface() can query
SourceSurface::GetRect() and apply the necessary offset themselves.
MozReview-Commit-ID: C31FGirQ0oK
--HG--
extra : rebase_source : ac31ae3ca0a0b188f9293c4e6898b4e4a65cad0e
A Box is like a Rect but represented as (x1, y1, x2, y2) instead of
(x, y, w, h).
The API is bare-bones at the moment; it can be extended as needed
by future users.
MozReview-Commit-ID: FWv69Y5hP6t
--HG--
extra : rebase_source : 1f717727bc724842a2f6adcba9e6cbbe50059436
This patch takes the safest route for securing modifications to the dependency graph for D2D DrawTargets. It's possible a slightly optimal approach is possible, however lock contention should be rare and I believe this is the safest and most upliftable approach.
MozReview-Commit-ID: HGfSdEp2U5N
This patch takes the safest route for securing modifications to the dependency graph for D2D DrawTargets. It's possible a slightly optimal approach is possible, however lock contention should be rare and I believe this is the safest and most upliftable approach.
MozReview-Commit-ID: HGfSdEp2U5N
OpenType font collections (*.ttc) contain multiple faces in a single file,
identified via index. When creating a font descriptor for a FreeType or
Fontconfig font, we mistakenly set the index to zero, always.
This bug became visible when layout and WebRender would disagree on the face in
use, rendering text with the metrics from the proper face but the outlines of
another. Unless, of course, the selected face was the first (or only) in the
font file.
MozReview-Commit-ID: 73qcPOD0HIr
--HG--
extra : rebase_source : b5784ff547bae99186d646dbb92b31660beb3970
This was leading to a mutex never being unlocked, eventually causing a
crash when it was destroyed.
MozReview-Commit-ID: JzEDWzKxZ4S
--HG--
extra : rebase_source : c86ad738addbec55f33165d300876f4c675cf5f4
This will make it so that we avoid main thread rasterization for box shadows.
MozReview-Commit-ID: 9Tg4dsH21V6
--HG--
extra : rebase_source : 5af0460239ba3d54aca483b07a494e81ed9294d2
This debug only bounds checking is not thread safe to any filter nodes drawing at
the same time. I believe it makes sense to just manually calculate the bounds and
pass them along in the functions that need them.
MozReview-Commit-ID: 9GiYRbWuVF6
--HG--
extra : rebase_source : 388187ef92505a946d4e0a9392353373a9cfeced
Caching SourceSurfaces on a filter node is not thread safe to multiple
threads executing the same filter node at the same time. We could add
a mutex to every filter node and guard on that, but I think it makes
sense to just remove the caching for now. I'm open to readding this,
if this proves to be a problem.
MozReview-Commit-ID: Ca38WlG3V89
--HG--
extra : rebase_source : f0e63b4996928eea5588801d1a724c4a9f3d5040
PowCache is not thread safe to the same filter node being drawn by multiple threads
at the same time. In this case I think it's easiest to just add a mutex for this
filter node.
MozReview-Commit-ID: 7pHuFYGxV4B
--HG--
extra : rebase_source : 3f0d9bc608880082a54b245d2fc4f7b970222a9a
This uses std::floor(T) instead of floor(double) so that we end up calling
floorf(float) for floats instead floor(double). It also changes the literals to
be floats. 0.5f is exactly representable in float and so will transparently
promote to double as needed.
--HG--
extra : rebase_source : ea193026b3c7d1f97f5abbc3f9220eca5ac5523c
This patch was originally developed on bug 1418564.
MozReview-Commit-ID: 53oydIqjhvF
--HG--
extra : rebase_source : 8980cc947b3b8c46a75d032e7e557f39bae08b97
This commit modifies MultiTiledContentClient to record drawing commands and
replay them to the tiled draw target on the paint thread when OMTP is enabled.
MozReview-Commit-ID: 22zL3c4NZvu
--HG--
extra : rebase_source : f8256b678da683da76edc02769dd4d0ebe234e09
Other draw targets do this in their initialization code, so capture should also.
MozReview-Commit-ID: CBsui9IJwXI
--HG--
extra : rebase_source : c3a818618cee0bab7ac3c99a42daf698c063e0c0
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py
For every file that is modified in this patch, the changes are as follows:
(1) The patch changes the file to use the exact C++ mode lines from the
Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line
(2) The patch deletes any blank lines between the mode line & the MPL
boilerplate comment.
(3) If the file previously had the mode lines and MPL boilerplate in a
single contiguous C++ comment, then the patch splits them into
separate C++ comments, to match the boilerplate in the coding style.
MozReview-Commit-ID: 77D61xpSmIl
--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
This patch was automatically generated. I found the files to be fixed in this
patch with the following command:
grep -r " \* This Source Code" gfx
...and then I modified each of these files with the following script
(where $1 is the filename to be modified):
###
line1=" \* This Source Code Form is subject to the terms of the Mozilla Public"
line2=" \* License, v\. 2\.0\. If a copy of the MPL was not distributed with this"
line3=" \* file, You can obtain one at http://mozilla\.org/MPL/2\.0/\. \*/"
# Strip off 1 space at beginning:
sed -i s%"^ $line1"%"$line1"% $1
sed -i s%"^ $line2"%"$line2"% $1
sed -i s%"^ $line3"%"$line3"% $1
###
MozReview-Commit-ID: EwCjyajgY4W
--HG--
extra : rebase_source : c61ca17ba556290d1f27af0a0c84e2ccc5371a36
This patch was automatically generated. I found the files to be fixed in this
patch with the following command:
grep -r "^\* This Source Code" gfx
...and then I modified each of these files with the following script
(where $1 is the filename to be modified):
###
line1="\* This Source Code Form is subject to the terms of the Mozilla Public"
line2="\* License, v\. 2\.0\. If a copy of the MPL was not distributed with this"
line3="\* file, You can obtain one at http://mozilla\.org/MPL/2\.0/\. \*/"
# Insert 1 space at beginning:
sed -i s%"^$line1"%" $line1"% $1
sed -i s%"^$line2"%" $line2"% $1
sed -i s%"^$line3"%" $line3"% $1
###
MozReview-Commit-ID: HXBMrfnhlVr
--HG--
extra : rebase_source : de4c78563711f8366e2978c5199a5041875fbe38
- Oculus SDK was updated from 1.5 to 1.9
- As the Oculus API now returns quaternion orientations for each
eye-to-head transform, I needed to send more information to the
content process.
- Rather than adding the quaternion, we now calculate the view matrices
on the VR thread in the GPU process rather than calculating it in the
content thread from parameters.
- OpenVR's full view matrix is now used, for compatibility with more devices.
- IPD adjustments are now updated every frame for both Oculus and OpenVR.
MozReview-Commit-ID: LOtfs4QIqc8
--HG--
extra : rebase_source : 0a69824012ede4bea0e0e709a2d027d0c35730bb
This changes the serialization format a little bit.
We now have an index at the end of the blob. This
is currently used to store a list of the used font keys.
In the future we'll add rects and can use it for invalidation.
Patch originally developed in bug 1406138, but landed in bug 1405790 since it
needs to land together with the upstream WR changes in PR 1816.
MozReview-Commit-ID: IHVoKhVncd5
--HG--
extra : rebase_source : 912e3d903d71c1b664817457e67aa6d81be3f4dd