This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Commit 6cafdc0
Revert "Draw image filters directly under non-axis-aligned transforms"
This reverts commit f8f23b2.
Reason for revert: b/172617382 is creating issues for Android's Webview
Original change's description:
> Draw image filters directly under non-axis-aligned transforms
>
> This removes hacking the canvas CTM and wrapping the paint's image
> filter in a special MatrixTransform that computed a post-transform
> instead of its documented pre-transform effect. Performance-wise, the
> computed layer sizes should be about the same, but we avoid one less
> render target switch because we apply the transformation while drawing
> to the dst device, vs. transforming into another temporary layer and
> then drawing that to the dst device.
>
> Several important changes in behavior here:
> 1. The DeviceCM record no longer has a stashed matrix to restore and
> holds its restoration paint directly.
> 2. Devices for image filter inputs can now have device-to-global
> transforms that are not integer translates.
> 3. The MatrixTransform hack punted when there was perspective because it
> could produce excessively large temporary images, but the new version
> appears to work around that. We now impose a maximum layer size to
> protect against that and automatically scale the layer to prevent it.
> Perspective image filters otherwise now draw correctly.
> 6. Updated layer sizing code to use the new image filter APIs
> 7. Updated backdrop filter and restore filters to go through the same
> code paths, although restore filters skip the intermediate image
> transform.
> - layer bounds and transforms now go through the updated skif API
> and is hopefully more straight forward to understand.
> 8. Now we can optimize root color filter nodes of a filter DAG, even if
> the entire DAG can't be represented as a color filter. The last node
> is pulled off and composed with the restoration paint instead.
>
> Bug: skia:9074,skia:9283
> Change-Id: I1fa1d50135b9d6d453b02f89aa3cc3b54deab678
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/328376
> Commit-Queue: Michael Ludwig <[email protected]>
> Reviewed-by: Brian Salomon <[email protected]>
[email protected],[email protected],[email protected],[email protected],[email protected]
Change-Id: I098d0e4b8ee067b436400eb9fea047e629544eec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:9074
Bug: skia:9283
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332737
Reviewed-by: Michael Ludwig <[email protected]>
Reviewed-by: Derek Sollenberger <[email protected]>
Commit-Queue: Michael Ludwig <[email protected]>1 parent 05f74f2 commit 6cafdc0
File tree
8 files changed
+498
-462
lines changed- include/core
- src/core
8 files changed
+498
-462
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | 15 | | |
20 | 16 | | |
21 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2557 | 2557 | | |
2558 | 2558 | | |
2559 | 2559 | | |
| 2560 | + | |
| 2561 | + | |
| 2562 | + | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
2560 | 2567 | | |
2561 | 2568 | | |
2562 | 2569 | | |
| |||
2594 | 2601 | | |
2595 | 2602 | | |
2596 | 2603 | | |
| 2604 | + | |
2597 | 2605 | | |
2598 | 2606 | | |
2599 | 2607 | | |
2600 | 2608 | | |
| 2609 | + | |
| 2610 | + | |
| 2611 | + | |
| 2612 | + | |
| 2613 | + | |
| 2614 | + | |
2601 | 2615 | | |
2602 | 2616 | | |
2603 | 2617 | | |
| |||
2626 | 2640 | | |
2627 | 2641 | | |
2628 | 2642 | | |
2629 | | - | |
| 2643 | + | |
2630 | 2644 | | |
2631 | 2645 | | |
2632 | 2646 | | |
| |||
2709 | 2723 | | |
2710 | 2724 | | |
2711 | 2725 | | |
| 2726 | + | |
2712 | 2727 | | |
2713 | 2728 | | |
2714 | 2729 | | |
2715 | 2730 | | |
2716 | 2731 | | |
2717 | 2732 | | |
2718 | 2733 | | |
2719 | | - | |
2720 | | - | |
2721 | | - | |
2722 | | - | |
2723 | | - | |
2724 | | - | |
2725 | | - | |
2726 | | - | |
2727 | | - | |
2728 | | - | |
2729 | | - | |
2730 | | - | |
2731 | | - | |
2732 | | - | |
2733 | | - | |
2734 | | - | |
2735 | | - | |
2736 | | - | |
2737 | 2734 | | |
2738 | 2735 | | |
2739 | 2736 | | |
| |||
0 commit comments