mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Improve AyncTask throughput inside WidgetPreviewLoader
b/21133230 > Synchronized block was creating a bottleneck for the AsyncTasks. > Remove calls that doesn't need to be synchronized outside synchronized block. > Also removed setAlpha call as after the bottleneck was removed, Inefficient alpha view usage alert started popping up in traceview. Due to less jankness, removing the fadein animation doesn't have any visible effect. Link to lock congestion visualization: https://x20web.corp.google.com/~hyunyoungs/no_crawl/traceview/traceview_lockcontention.html Result: gfx-avg-jank delta = "-1" Change-Id: If12817df0730f346cdba7e2f38f232eb9a4336c0
This commit is contained in:
@@ -64,6 +64,14 @@ public class WidgetImageView extends View {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevents the inefficient alpha view rendering.
|
||||
*/
|
||||
@Override
|
||||
public boolean hasOverlappingRendering() {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void updateDstRectF() {
|
||||
if (mBitmap.getWidth() > getWidth()) {
|
||||
float scale = ((float) getWidth()) / mBitmap.getWidth();
|
||||
|
||||
Reference in New Issue
Block a user