summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Schlomoff <gregschlom@google.com>2022-04-07 04:54:55 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-07 04:54:55 +0000
commit96481336b5f4f689efb8a4b08f3d185391194901 (patch)
tree271d25f53f0226561914d3d5e7552c37e27c7211
parent44eb136f77ec2118bebb008b2051b1f39ed984e6 (diff)
parentbb0ff5f03851b49b1c16455ebff06f1060e2b1d5 (diff)
downloadvulkan-cereal-96481336b5f4f689efb8a4b08f3d185391194901.tar.gz
Make sure ScopedBind stays in scope for the entirety of FrameBuffer::initialize. am: ff4eb6b511 am: bb0ff5f038
Original change: https://android-review.googlesource.com/c/device/generic/vulkan-cereal/+/2058047 Change-Id: I7b5eec67bfb5fd5d4fc9d96cb160cdabc120342b 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;
}