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.
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
Attachment #819774 - Attachment description: patch → Part 1: Add DrawSurface with ColorMatrix, fix skia backend issues, and use for feColorMatrix.
How does this fit with bug 814113?
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.
Erm no :-( I meant bug 924103
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: 5 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
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.