From 6cc720b70a8ee612d90f766df2dfde427d9f5e0d Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Mon, 6 Apr 2020 13:45:31 -0700 Subject: ViewRootImpl: Pass buffer to finishDrawing when requested As the final enabler for the BLASTSyncEngine, we add a new relayout result BLAST_SYNC. If the WindowState is participating in a BLAST sync during relayout we return it to the client. If we return it to the client the client will direct it's next draw in to a BLAST transaction and report that transaction via finishDrawing. You can now observe the BLASTSyncEngine working end to end in TaskOrganizerMultiWindowTests. We do a few small clean-ups in TaskOrganizerMultiWindowTest while we are there. Bug: 153561718 Test: TaskOrganizerMultiWindowTests Change-Id: I719b731350b942aafa444a33972aaef8973422ea --- core/java/android/view/WindowManagerGlobal.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/java/android/view/WindowManagerGlobal.java') diff --git a/core/java/android/view/WindowManagerGlobal.java b/core/java/android/view/WindowManagerGlobal.java index 410d9afe73da..ab968d798745 100644 --- a/core/java/android/view/WindowManagerGlobal.java +++ b/core/java/android/view/WindowManagerGlobal.java @@ -101,6 +101,14 @@ public final class WindowManagerGlobal { */ public static final int RELAYOUT_RES_CONSUME_ALWAYS_SYSTEM_BARS = 0x40; + /** + * This flag indicates the client should not directly submit it's next frame, + * but instead should pass it in the postDrawTransaction of + * {@link WindowManagerService#finishDrawing}. This is used by the WM + * BLASTSyncEngine to synchronize rendering of multiple windows. + */ + public static final int RELAYOUT_RES_BLAST_SYNC = 0x80; + /** * Flag for relayout: the client will be later giving * internal insets; as a result, the window will not impact other window -- cgit v1.2.3