diff options
author | alk3pInjection <webmaster@raspii.tech> | 2023-04-20 00:08:54 +0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2023-04-20 00:08:54 +0800 |
commit | 700894222ef5c27947fba1d83e8717f1caad9673 (patch) | |
tree | f13143e689ae969f564972cd44c845f516d301bb /libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp | |
parent | 170ac41d329349edb67163fbd5f49f4788a55fcc (diff) | |
parent | 308c98f901f540b2a61bde5363434d613b27fd0b (diff) |
Merge tag 'LA.QSSI.13.0.r1-09800-qssi.0' into tachibana
"LA.QSSI.13.0.r1-09800-qssi.0"
Conflicts:
core/java/android/app/StatusBarManager.java
core/java/android/provider/Settings.java
packages/SystemUI/res/values/config.xml
packages/SystemUI/res/values/styles.xml
packages/SystemUI/src/com/android/keyguard/KeyguardClockSwitch.java
packages/SystemUI/src/com/android/systemui/flags/Flags.java
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSFactoryImpl.java
packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java
packages/SystemUI/src/com/android/systemui/shade/NotificationPanelViewController.java
Change-Id: I991d734864d4fc3b542a52e4a0ab3a0a5ccd2a35
Diffstat (limited to 'libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp')
-rw-r--r-- | libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp index 905d46e58014..cc2565d88d5e 100644 --- a/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp +++ b/libs/hwui/pipeline/skia/SkiaVulkanPipeline.cpp @@ -55,7 +55,12 @@ VulkanManager& SkiaVulkanPipeline::vulkanManager() { } MakeCurrentResult SkiaVulkanPipeline::makeCurrent() { - return MakeCurrentResult::AlreadyCurrent; + // In case the surface was destroyed (e.g. a previous trimMemory call) we + // need to recreate it here. + if (!isSurfaceReady() && mNativeWindow) { + setSurface(mNativeWindow.get(), SwapBehavior::kSwap_default); + } + return isContextReady() ? MakeCurrentResult::AlreadyCurrent : MakeCurrentResult::Failed; } Frame SkiaVulkanPipeline::getFrame() { @@ -130,7 +135,11 @@ DeferredLayerUpdater* SkiaVulkanPipeline::createTextureLayer() { void SkiaVulkanPipeline::onStop() {} -bool SkiaVulkanPipeline::setSurface(ANativeWindow* surface, SwapBehavior swapBehavior) { +// We can safely ignore the swap behavior because VkManager will always operate +// in a mode equivalent to EGLManager::SwapBehavior::kBufferAge +bool SkiaVulkanPipeline::setSurface(ANativeWindow* surface, SwapBehavior /*swapBehavior*/) { + mNativeWindow = surface; + if (mVkSurface) { vulkanManager().destroySurface(mVkSurface); mVkSurface = nullptr; |