Merge "Add tracing to wallpaper local colors" into tm-dev

This commit is contained in:
TreeHugger Robot
2022-04-01 17:30:41 +00:00
committed by Android (Google) Code Review

View File

@@ -1632,6 +1632,7 @@ public abstract class WallpaperService extends Service {
float finalXOffsetStep = xOffsetStep; float finalXOffsetStep = xOffsetStep;
float finalXOffset = xOffset; float finalXOffset = xOffset;
mHandler.post(() -> { mHandler.post(() -> {
Trace.beginSection("WallpaperService#processLocalColors");
resetWindowPages(); resetWindowPages();
int xPage = xCurrentPage; int xPage = xCurrentPage;
EngineWindowPage current; EngineWindowPage current;
@@ -1662,6 +1663,7 @@ public abstract class WallpaperService extends Service {
} }
current = mWindowPages[xPage]; current = mWindowPages[xPage];
updatePage(current, xPage, xPages, finalXOffsetStep); updatePage(current, xPage, xPages, finalXOffsetStep);
Trace.endSection();
}); });
} }
@@ -1734,6 +1736,7 @@ public abstract class WallpaperService extends Service {
private void updatePageColors(EngineWindowPage page, int pageIndx, int numPages, private void updatePageColors(EngineWindowPage page, int pageIndx, int numPages,
float xOffsetStep) { float xOffsetStep) {
if (page.getBitmap() == null) return; if (page.getBitmap() == null) return;
Trace.beginSection("WallpaperService#updatePageColors");
if (DEBUG) { if (DEBUG) {
Log.d(TAG, "updatePageColorsLocked for page " + pageIndx + " with areas " Log.d(TAG, "updatePageColorsLocked for page " + pageIndx + " with areas "
+ page.getAreas().size() + " and bitmap size of " + page.getAreas().size() + " and bitmap size of "
@@ -1779,6 +1782,7 @@ public abstract class WallpaperService extends Service {
} }
} }
} }
Trace.endSection();
} }
private RectF generateSubRect(RectF in, int pageInx, int numPages) { private RectF generateSubRect(RectF in, int pageInx, int numPages) {