Skip to content

Commit

Permalink
[Vk] Let stall in VulkanAndroidWindow::setNativeWindow(). Should we j…
Browse files Browse the repository at this point in the history
…ust stall in destroySwapchain() instead?
  • Loading branch information
eugenegff committed Dec 5, 2024
1 parent e68d105 commit d2fd02f
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,6 @@ namespace Ogre
{
if( mNativeWindow )
{
// Android is destroying our window. Possibly user pressed the home or power
// button.
//
// We must flush all our references to the old swapchain otherwise when
// the app goes to foreground again and submit that stale content Mali
// will return DEVICE_LOST
mDevice->stall();
}

Expand Down Expand Up @@ -336,6 +330,14 @@ namespace Ogre
//-------------------------------------------------------------------------
void VulkanAndroidWindow::setNativeWindow( ANativeWindow *nativeWindow )
{
// Android is destroying our window. Possibly user pressed the home or power
// button.
//
// We must flush all our references to the old swapchain otherwise when
// the app goes to foreground again and submit that stale content Mali
// will return DEVICE_LOST
mDevice->stall();

destroySwapchain();
destroySurface();

Expand Down

0 comments on commit d2fd02f

Please sign in to comment.