summaryrefslogtreecommitdiffstats
path: root/gfx/layers/wr/WebRenderImageHost.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/layers/wr/WebRenderImageHost.cpp')
-rw-r--r--gfx/layers/wr/WebRenderImageHost.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/gfx/layers/wr/WebRenderImageHost.cpp b/gfx/layers/wr/WebRenderImageHost.cpp
index e3bbd5d50f..5016bc30f8 100644
--- a/gfx/layers/wr/WebRenderImageHost.cpp
+++ b/gfx/layers/wr/WebRenderImageHost.cpp
@@ -198,8 +198,11 @@ void WebRenderImageHost::UseRemoteTexture() {
while (!mPendingRemoteTextureWrappers.empty()) {
auto* wrapper =
mPendingRemoteTextureWrappers.front()->AsRemoteTextureHostWrapper();
- mWaitingReadyCallback = RemoteTextureMap::Get()->GetRemoteTexture(
- wrapper, readyCallback, mWaitForRemoteTextureOwner);
+ if (mWaitForRemoteTextureOwner) {
+ RemoteTextureMap::Get()->WaitForRemoteTextureOwner(wrapper);
+ }
+ mWaitingReadyCallback =
+ RemoteTextureMap::Get()->GetRemoteTexture(wrapper, readyCallback);
MOZ_ASSERT_IF(mWaitingReadyCallback, !wrapper->IsReadyForRendering());
if (!wrapper->IsReadyForRendering()) {
break;
@@ -213,9 +216,9 @@ void WebRenderImageHost::UseRemoteTexture() {
mPendingRemoteTextureWrappers.pop_front();
MOZ_ASSERT(mPendingRemoteTextureWrappers.empty());
- std::function<void(const RemoteTextureInfo&)> function;
- RemoteTextureMap::Get()->GetRemoteTexture(wrapper, std::move(function),
- mWaitForRemoteTextureOwner);
+ if (mWaitForRemoteTextureOwner) {
+ RemoteTextureMap::Get()->WaitForRemoteTextureOwner(wrapper);
+ }
mWaitForRemoteTextureOwner = false;
}