Commit a8e5a2b
committed
Optimize handling of scrolled wallpapers
Swiping the home screen causes the WindowManagerService to do
a bunch of work to keep the wallpapers in sync. First, it lays out
and places all windows. Also, it notifies the SystemUI process that
the wallpaper position has changed.
The layout/place operation is too much work - we only need to set
the position values for the wallpaper, not relayout the whole system.
The notification mechanism must exist, but should be optional. Most
wallpapers don't care (especially static ImageWallpapers). So we'll
give them a new API (WallpaperService.Engine.setWantsOffsets()) to
allow wallpapers to opt out of this process and avoid the performance
overhead.
Change-Id: I66c38375438937f14f6f5550565b28eb204b1e061 parent 48ba413 commit a8e5a2b
File tree
5 files changed
+66
-11
lines changed- api
- core/java/android
- service/wallpaper
- view
- packages/SystemUI/src/com/android/systemui
- services/java/com/android/server/wm
5 files changed
+66
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18669 | 18669 | | |
18670 | 18670 | | |
18671 | 18671 | | |
| 18672 | + | |
18672 | 18673 | | |
18673 | 18674 | | |
18674 | 18675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
| 151 | + | |
| 152 | + | |
151 | 153 | | |
| 154 | + | |
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
| |||
359 | 362 | | |
360 | 363 | | |
361 | 364 | | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
362 | 384 | | |
363 | 385 | | |
364 | 386 | | |
| |||
478 | 500 | | |
479 | 501 | | |
480 | 502 | | |
| 503 | + | |
| 504 | + | |
481 | 505 | | |
482 | 506 | | |
483 | 507 | | |
| |||
528 | 552 | | |
529 | 553 | | |
530 | 554 | | |
531 | | - | |
| 555 | + | |
| 556 | + | |
532 | 557 | | |
533 | 558 | | |
534 | 559 | | |
| |||
554 | 579 | | |
555 | 580 | | |
556 | 581 | | |
| 582 | + | |
| 583 | + | |
557 | 584 | | |
558 | 585 | | |
559 | 586 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
815 | 826 | | |
816 | 827 | | |
817 | 828 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
173 | 175 | | |
174 | 176 | | |
175 | 177 | | |
| |||
Lines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1836 | 1836 | | |
1837 | 1837 | | |
1838 | 1838 | | |
1839 | | - | |
| 1839 | + | |
| 1840 | + | |
1840 | 1841 | | |
1841 | 1842 | | |
1842 | 1843 | | |
| |||
1886 | 1887 | | |
1887 | 1888 | | |
1888 | 1889 | | |
1889 | | - | |
| 1890 | + | |
1890 | 1891 | | |
1891 | 1892 | | |
1892 | 1893 | | |
1893 | | - | |
1894 | | - | |
1895 | 1894 | | |
1896 | 1895 | | |
1897 | 1896 | | |
| |||
1916 | 1915 | | |
1917 | 1916 | | |
1918 | 1917 | | |
1919 | | - | |
| 1918 | + | |
| 1919 | + | |
| 1920 | + | |
| 1921 | + | |
| 1922 | + | |
| 1923 | + | |
| 1924 | + | |
| 1925 | + | |
| 1926 | + | |
| 1927 | + | |
| 1928 | + | |
| 1929 | + | |
| 1930 | + | |
| 1931 | + | |
| 1932 | + | |
| 1933 | + | |
| 1934 | + | |
| 1935 | + | |
| 1936 | + | |
| 1937 | + | |
1920 | 1938 | | |
1921 | 1939 | | |
1922 | 1940 | | |
1923 | 1941 | | |
1924 | 1942 | | |
1925 | | - | |
1926 | | - | |
1927 | 1943 | | |
1928 | 1944 | | |
1929 | 1945 | | |
| |||
2436 | 2452 | | |
2437 | 2453 | | |
2438 | 2454 | | |
2439 | | - | |
2440 | | - | |
2441 | | - | |
| 2455 | + | |
2442 | 2456 | | |
2443 | 2457 | | |
2444 | 2458 | | |
| |||
0 commit comments