Allow destroySurface to get called in transaction.
Previously, destroy was always initiated immediatley and could not be
synchronized with a client transaction. This change allows
destroySurface to be called in the same transaction as other client
state updates.
Test: Unit tests pass
Test: Call from Java fixes bugs.
Change-Id: I841359530538961a0187216cc455cc388c0ede77
Fixes: 72953020
Fixes: 71499373
diff --git a/libs/gui/LayerState.cpp b/libs/gui/LayerState.cpp
index b5295f2..01acc2d 100644
--- a/libs/gui/LayerState.cpp
+++ b/libs/gui/LayerState.cpp
@@ -231,6 +231,9 @@
what |= eReparent;
parentHandleForChild = other.parentHandleForChild;
}
+ if (other.what & eDestroySurface) {
+ what |= eDestroySurface;
+ }
}
}; // namespace android