If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Implement feColorMatrix and feBlend using Moz2D

RESOLVED DUPLICATE of bug 924103

Status

()

Core
Graphics
RESOLVED DUPLICATE of bug 924103
4 years ago
4 years ago

People

(Reporter: gal, Assigned: gal)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

4 years ago
This patch adds a new DrawSurface variant that applies a color matrix while blitting a source surface. A portable fallback is implemented using skia. 2D backends can overwrite that fallback for better performance (the fallback is already much faster than the original naive code). As a bonus I also added support for feBlend via skia.

The patch also fixes a couple bugs in the skia backend of Moz2D. In particular we avoid bitmap pixel copies for source surfaces and also the draw target.

Currently new skia draw targets and source surfaces are created from within the SVG filter operation. A future patch should paint the filtered frame using Azure and hand in the snapshots and an azure draw target. That should give us fully accelerated SVG effects.
(Assignee)

Comment 1

4 years ago
Created attachment 819774 [details] [diff] [review]
Part 1: Add DrawSurface with ColorMatrix, fix skia backend issues, and use for feColorMatrix.

Part 1: Add DrawSurface with ColorMatrix, fix a bunch of skia backend issues and use Azute for feColorMatrix.
Assignee: nobody → gal
(Assignee)

Updated

4 years ago
Attachment #819774 - Attachment description: patch → Part 1: Add DrawSurface with ColorMatrix, fix skia backend issues, and use for feColorMatrix.
(Assignee)

Comment 2

4 years ago
Created attachment 819777 [details] [diff] [review]
Part 2: Implement feBlend via Moz2D as well
(Assignee)

Updated

4 years ago
Attachment #819774 - Flags: review?(gwright)
(Assignee)

Updated

4 years ago
Attachment #819777 - Flags: review?(gwright)

Comment 3

4 years ago
How does this fit with bug 814113?
(Assignee)

Comment 4

4 years ago
Is that the right bug #?
Hi Andreas, I'm changing all of this code in bug 924102 and bug 924103, so I don't think it makes sense to take these patches now. Those bugs make our software implementation faster and lay the groundwork for GPU accelerated filter rendering which I'll work on after finishing the software part.

Comment 6

4 years ago
Erm no :-(

I meant bug 924103
(Assignee)

Comment 7

4 years ago
I started an 8 hour flight without Wifi with diagnosing some slowness on the B2G homescreen and ended up fixing this :) I will see if I can help review the other patch since I have been staring at this code all day anyway.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 924103
Comment on attachment 819774 [details] [diff] [review]
Part 1: Add DrawSurface with ColorMatrix, fix skia backend issues, and use for feColorMatrix.

I'm assuming I can clear the r? flags based on Andreas' comment 7
Attachment #819774 - Flags: review?(gwright)
Attachment #819777 - Flags: review?(gwright)
(Assignee)

Comment 9

4 years ago
Yup we will continue this work in the dup.
You need to log in before you can comment on or make changes to this bug.