Closed Bug 1824502 Opened 2 years ago Closed 6 months ago

WR SVG filters: Lay the groundwork for natively rendering SVG filters, part 1

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: ahale, Assigned: ahale)

References

(Blocks 2 open bugs)

Details

Attachments

(5 files, 2 obsolete files)

Start building a new infrastructure for WR native rendering of SVG filter effects so that we can do completely native support with named inputs and outposts, this will also mean starting to implement CSS filters with similar capabilities in case they are mixed.

filters implementation r?gwx

Assignee: nobody → ahale
Attachment #9326171 - Attachment description: WIP: Bug 1824502 - first steps towards a completely WebRender native SVG → Bug 1824502 - implement several native WebRender SVG filters
Status: NEW → ASSIGNED
Attachment #9326171 - Attachment description: Bug 1824502 - implement several native WebRender SVG filters → Bug 1824502 - first steps towards a completely WebRender native SVG
Attachment #9326171 - Attachment description: Bug 1824502 - first steps towards a completely WebRender native SVG → Bug 1824502 - implement SVG filter graph and several filters in WebRender r?gw
Attachment #9345663 - Attachment is obsolete: true

I've been iterating on test cases for filter regions larger than the primitives they derive from, which seems to result in scaling down the image and should not.

Enabling the newly implemented gaussian blur in my diff causes this persistent corruption of the whole page when I refresh the page with web developer tools open, it stays corrupted if I close the web developer tools and refresh the page, but duplicating the tab gives me a clean render again, until I refresh. Weird bug.

Blocks: 1873644
Blocks: 1573994
Blocks: 1573657

Status: With significant refactoring (again, and again, and again) in D174208 I have resolved the positioning issues with subregions by consistently transforming to SVG's concept of User Space on the Gecko side, and am working on the last few test failures. When this lands it will resolve some dozen or so bugs (including 2 WPT tests and a couple reftests).

Pushed by ahale@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a0b3e2669a2d Implement native SVG filter rendering in WebRender r=gw

Backed out for causing wrench failures

Backout link: https://hg.mozilla.org/integration/autoland/rev/d7939f8694c6b6a04bfadbc1bcccb4af1cb1739f

Push with failures

Failure log

Granting important runtime permissions to org.mozilla.wrench
[task 2024-05-08T05:17:55.870Z] Unable to grant runtime permission android.permission.READ_EXTERNAL_STORAGE to org.mozilla.wrench due to args: adb wait-for-device shell pm grant org.mozilla.wrench android.permission.READ_EXTERNAL_STORAGE, exitcode: 255, stdout: 
[task 2024-05-08T05:17:55.870Z] Exception occurred while executing 'grant':
[task 2024-05-08T05:17:55.870Z] java.lang.SecurityException: Package org.mozilla.wrench has not requested permission android.permission.READ_EXTERNAL_STORAGE
[task 2024-05-08T05:17:55.870Z] 	at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1404)
[task 2024-05-08T05:17:55.870Z] 	at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1319)
[task 2024-05-08T05:17:55.870Z] 	at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:547)
[task 2024-05-08T05:17:55.870Z] 	at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:597)
[task 2024-05-08T05:17:55.870Z] 	at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2546)
[task 2024-05-08T05:17:55.870Z] 	at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:292)
[task 2024-05-08T05:17:55.870Z] 	at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
[task 2024-05-08T05:17:55.870Z] 	at android.os.ShellCommand.exec(ShellCommand.java:38)
[task 2024-05-08T05:17:55.870Z] 	at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:5954)
[task 2024-05-08T05:17:55.870Z] 	at android.os.Binder.shellCommand(Binder.java:1049)
[task 2024-05-08T05:17:55.870Z] 	at android.os.Binder.onTransact(Binder.java:877)
[task 2024-05-08T05:17:55.870Z] 	at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4313)
[task 2024-05-08T05:17:55.870Z] 	at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:5938)
[task 2024-05-08T05:17:55.870Z] 	at android.os.Binder.execTransactInternal(Binder.java:1285)
[task 2024-05-08T05:17:55.870Z] 	at android.os.Binder.execTransact(Binder.java:1244)
[task 2024-05-08T05:17:55.870Z] Unable to grant runtime permission android.permission.ACCESS_COARSE_LOCATION to org.mozilla.wrench due to args: adb wait-for-device shell pm grant org.mozilla.wrench android.permission.ACCESS_COARSE_LOCATION, exitcode: 255, stdout: 
[task 2024-05-08T05:17:55.870Z] Exception occurred while executing 'grant':
[task 2024-05-08T05:17:55.870Z] java.lang.SecurityException: Package org.mozilla.wrench has not requested permission android.permission.ACCESS_COARSE_LOCATION
[task 2024-05-08T05:17:55.870Z] 	at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1404)
Flags: needinfo?(ahale)

I've tweaked the fuzzy values on the two new tests I added that seem to run into antialiased edge issues on android, antialiasing isn't the subject of the functionality being tested (the tests are for large-scale positioning of elements on the page being done correctly), and I have added the android test jobs to my current try run for the patch, but it's been going for over an hour without results so far, so I do not know yet if my changes fixed the tests.

Pushed by ahale@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c0f58fd74e56 Implement native SVG filter rendering in WebRender r=gw

Tests are green on those android devices, so I am attempting to land D209646 again. This doesn't bring any new user-visible features, but may cause a slight performance regression due to the WebRender FilterOp struct becoming larger, talos tests that I ran previously showed it wasn't very notable.

The bigger patch is D174208 which is still a work in progress as I address test failures (which only appeared after rebasing recently), it will be the user-visible part of this, but initially only enabled in Nightly channel, for that I'll need to add release notes.

Flags: needinfo?(ahale)
Attachment #9326171 - Attachment description: Bug 1824502 - implement SVG filter graph and several filters in WebRender r?gw → Bug 1824502 - Implement FilterInstance code to send SVG filter graph to WebRender
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch
Status: RESOLVED → REOPENED
Keywords: leave-open
Resolution: FIXED → ---

Please file a follow-up bug for further work. leave-open bugs make it hard to track uplifts and regressions.

You can move phabricator patches to different bugs just by changing the bug number in the commit message and re-submitting; all comments and review states will be kept.

Status: REOPENED → RESOLVED
Closed: 6 months ago6 months ago
Keywords: leave-open
Resolution: --- → FIXED
Summary: WR SVG filters: Lay the groundwork for natively rendering SVG filters → WR SVG filters: Lay the groundwork for natively rendering SVG filters, part 1
Blocks: 1896503
Blocks: 1896504
Attachment #9326171 - Attachment description: Bug 1824502 - Implement FilterInstance code to send SVG filter graph to WebRender → Bug 1896503 - Implement FilterInstance code to send SVG filter graph to WebRender

Comment on attachment 9326171 [details]
Bug 1896503 - Implement FilterInstance code to send SVG filter graph to WebRender

Revision D174208 was moved to bug 1896503. Setting attachment 9326171 [details] to obsolete.

Attachment #9326171 - Attachment is obsolete: true
No longer blocks: 1896504
No longer blocks: 1873644
Duplicate of this bug: 1573657
Duplicate of this bug: 1573994
Blocks: 1586055
No longer blocks: 1573657, 1573994
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: