summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Schlomoff <gregschlom@google.com>2022-04-07 05:39:45 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-07 05:39:45 +0000
commit852ad5d113f039ed5103d9b72f9cbfffbce027e2 (patch)
tree271d25f53f0226561914d3d5e7552c37e27c7211
parent5bdff89eb00ee6e7b806cb3ce0da119ebcbd4374 (diff)
parent981d88fb6a315c1a1dc192cc4adcdc652fcc87c2 (diff)
downloadvulkan-cereal-852ad5d113f039ed5103d9b72f9cbfffbce027e2.tar.gz
Make sure ScopedBind stays in scope for the entirety of FrameBuffer::initialize. am: ff4eb6b511 am: bb0ff5f038 am: 96481336b5 am: 981d88fb6a
Original change: https://android-review.googlesource.com/c/device/generic/vulkan-cereal/+/2058047 Change-Id: I8c44b514ac8df55c42e9cc0f68b0c4df65cba169 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--stream-servers/FrameBuffer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/stream-servers/FrameBuffer.cpp b/stream-servers/FrameBuffer.cpp
index 8c606f17..2f733ae3 100644
--- a/stream-servers/FrameBuffer.cpp
+++ b/stream-servers/FrameBuffer.cpp
@@ -367,6 +367,8 @@ bool FrameBuffer::initialize(int width, int height, bool useSubWindow,
return false;
}
+ std::unique_ptr<ScopedBind> eglColorBufferBind;
+
std::unique_ptr<emugl::RenderDocWithMultipleVkInstances> renderDocMultipleVkInstances = nullptr;
if (!android::base::getEnvironmentVariable("ANDROID_EMU_RENDERDOC").empty()) {
SharedLibrary* renderdocLib = nullptr;
@@ -624,8 +626,8 @@ bool FrameBuffer::initialize(int width, int height, bool useSubWindow,
GL_LOG("attempting to make context current");
// Make the context current
- ScopedBind bind(fb->m_colorBufferHelper);
- if (!bind.isOk()) {
+ eglColorBufferBind = std::make_unique<ScopedBind>(fb->m_colorBufferHelper);
+ if (!eglColorBufferBind->isOk()) {
ERR("Failed to make current");
return false;
}