Commit 24e5388
authored
Optimize LineChart area fill rendering to avoid data duplication (#4289)
Refactored `LineChart` to draw filled areas by constructing the `GeneralPath` directly from the source points list, rather than creating a temporary `ArrayList` copy. This reduces memory allocation and garbage collection overhead during chart rendering.
Exposed `AbstractChart.calculateDrawPoints` as protected to facilitate this reuse.
Retained original logic for complex `BOUNDS` fill types where point modification is required.
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>1 parent 753391c commit 24e5388
2 files changed
Lines changed: 365 additions & 275 deletions
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments