Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync changes from mozilla-central gfx/wr #3970

Merged
merged 3 commits into from Jun 2, 2020
Merged

Conversation

@moz-gfx
Copy link

moz-gfx commented Jun 2, 2020

No description provided.

jamienicol and others added 3 commits Jun 2, 2020
…? r=aosmond

Bug 1635406 made it so that webrender snaps the offsets of animated
transforms before accumulating them in to the reference frame
transform. Unfortunately, however, this causes jittery animations. The
original intention was just to snap the visual viewport offset when
scrolling, to avoid excessive picture cache invalidation.

To avoid this, make it so that we only snap for reference frames of
kind ReferenceFrameKind::Zoom. This will mean that most animations are
unaffected. There may however still be some jitter when zooming, but
this is outweighed by the benefit of not invalidating picture cache
tiles every frame when scrolling.

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

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/439f76e56ddad32bb90e4a734f95851ebfbc2a59
…t,kvark

This patch removes two of the existing paths for evicting textures.
One is no longer useful, and the other is over-zealous, and causes
frame stalls.

When the shared texture cache made use of variable layer counts, the
`maybe_reclaim_shared_memory` method would look at the space in free
layers, and if large enough, would clear the entire cache and rely on
it being rebuilt implicitly as new requests occur. However, since we
no longer resize the number of slices, this doesn't serve a useful
purpose (the texture cache already frees any empty texture cache units
at the end of each frame).

The other method applies a conservative, periodic GC that occurs if no
other GCs have run for five seconds. However, this is a very aggressive
eviction that often evicts most of the shared cache, and was being run
whenever the size of the texture cache was > 16 MB. The effect of this
is that if you pause scrolling for a few seconds, and then scroll again,
most of the cache gets evicted. Instead, completely remove this concept,
relying on empty texture cache pages being freed and memory pressure
events, and general cache eviction during frames.

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

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/5cc77ea38625158138620dea6d8ba0bfa6ed64b7
…s. r=nical,aosmond

The logic for expanding the drop shadow clip rect was calling the
`map_vector` method in the `ScaleOffset` struct.

This method was incorrect (it was mapping the value as a point,
including the offset). This is fixed by modifying the `map_vector`
method to exclude the offset.

However, the text run snapping code was also calling map_vector
but expecting it to treat the value there as a point, so also
introduce a `map_point` method and switch the text run code
to use that.

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

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/f77b09a15a115913dc0eba1ff83168c65750e334
@moz-gfx
Copy link
Author

moz-gfx commented Jun 2, 2020

@bors-servo r=auto

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2020

📌 Commit 6b9a0a2 has been approved by auto

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2020

Testing commit 6b9a0a2 with merge bf9e210...

@bors-servo
Copy link
Contributor

bors-servo commented Jun 2, 2020

☀️ Test successful - status-taskcluster
Approved by: auto
Pushing bf9e210 to master...

@bors-servo bors-servo merged commit bf9e210 into servo:master Jun 2, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.