diff options
author | Greg Schlomoff <gregschlom@google.com> | 2022-04-07 04:29:32 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2022-04-07 04:29:32 +0000 |
commit | bb0ff5f03851b49b1c16455ebff06f1060e2b1d5 (patch) | |
tree | 271d25f53f0226561914d3d5e7552c37e27c7211 | |
parent | b65c9d4a01ce0f8bb6550283deab949050287101 (diff) | |
parent | ff4eb6b51150f263a7e90b4275858e455a365ab9 (diff) | |
download | vulkan-cereal-bb0ff5f03851b49b1c16455ebff06f1060e2b1d5.tar.gz |
Make sure ScopedBind stays in scope for the entirety of FrameBuffer::initialize. am: ff4eb6b511
Original change: https://android-review.googlesource.com/c/device/generic/vulkan-cereal/+/2058047
Change-Id: Iaf19757d4ce69f920cb9f153074a1163c7363dfa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r-- | stream-servers/FrameBuffer.cpp | 6 |
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; } |