Skip to content

chore: cherry-pick 4deb522c22 and d88e959e01 from chromium#33851

Merged
zcbenz merged 11 commits into16-x-yfrom
cherry-pick/16-x-y/chromium/d88e959e01
Apr 25, 2022
Merged

chore: cherry-pick 4deb522c22 and d88e959e01 from chromium#33851
zcbenz merged 11 commits into16-x-yfrom
cherry-pick/16-x-y/chromium/d88e959e01

Conversation

@ppontes
Copy link
Copy Markdown
Member

@ppontes ppontes commented Apr 20, 2022

[skia_renderer] - Don't explicitly clip scissor for large transforms

This adds a check to CanExplicitlyScissor that confirms that the device
space scissor rect, transformed to the quad's local space, can be
transformed back to device space and equal the same pixel bounds.

Without this check, sufficiently large scales and translates could
cause the local-space coordinates of the scissor rect to be in a float
range that does not have single-pixel precision, meaning it could round
significantly. Clipping the quad's coordinates to those rounded edges
and then transforming to device space can result in coordinates that
fall outside the original device-space scissor rect.

If however, we ensure we can round-trip the scissor coordinates, then
any clipping to the quad's coordinates will also be projected to within
the scissor rect as well.

(cherry picked from commit ab1b76f3e7cdad702c562f0b43bf3367caff4812)

Bug: 1272250
Change-Id: I7c37c54efd082723797ccf32b5d19ef285c520c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3306893
Commit-Queue: Michael Ludwig <[email protected]>
Reviewed-by: Brian Salomon <[email protected]>
Reviewed-by: Kyle Charbonneau <[email protected]>
Cr-Original-Commit-Position: refs/heads/main@{#946552}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3320870
Auto-Submit: Michael Ludwig <[email protected]>
Bot-Commit: Rubber Stamper <[email protected]>
Cr-Commit-Position: refs/branch-heads/4692@{#786}
Cr-Branched-From: 038cd96142d384c0d2238973f1cb277725a62eba-refs/heads/main@{#938553}

===============

[skia_renderer]: Use RectF::Intersect in ApplyScissor

(cherry picked from commit 540e2ecde447b0757dd5bb079a59d8faef3183c1)

Bug: 1299287, 1307317
Change-Id: I026090466ebfb3dee0e9daf0609f04babcf42092
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3516507
Reviewed-by: Kyle Charbonneau <[email protected]>
Reviewed-by: Brian Sheedy <[email protected]>
Commit-Queue: Michael Ludwig <[email protected]>
Cr-Original-Commit-Position: refs/heads/main@{#982400}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3564640
Cr-Commit-Position: refs/branch-heads/4896@{#1017}
Cr-Branched-From: 1f63ff4bc27570761b35ffbc7f938f6586f7bee8-refs/heads/main@{#972766}

Release Notes

Notes: Security: backported fix for CVE-2022-0116 and CVE-2022-1306.

@ppontes ppontes added security 🔒 semver/patch backwards-compatible bug fixes backport-check-skip Skip trop's backport validity checking 16-x-y labels Apr 20, 2022
@ppontes ppontes requested review from a team as code owners April 20, 2022 14:23
@zcbenz zcbenz merged commit 504daa7 into 16-x-y Apr 25, 2022
@zcbenz zcbenz deleted the cherry-pick/16-x-y/chromium/d88e959e01 branch April 25, 2022 00:38
@release-clerk
Copy link
Copy Markdown

release-clerk bot commented Apr 25, 2022

Release Notes Persisted

Security: backported fix for CVE-2022-0116 and CVE-2022-1306.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

16-x-y backport-check-skip Skip trop's backport validity checking security 🔒 semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants