From 40a355a42d4a9444dc753c04c6608dade2f06a23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:27 +0200 Subject: Adding upstream version 125.0.1. Signed-off-by: Daniel Baumann --- gfx/layers/client/TextureClient.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gfx/layers/client/TextureClient.cpp') diff --git a/gfx/layers/client/TextureClient.cpp b/gfx/layers/client/TextureClient.cpp index bfc20b9b08..4187e48955 100644 --- a/gfx/layers/client/TextureClient.cpp +++ b/gfx/layers/client/TextureClient.cpp @@ -27,6 +27,7 @@ #include "mozilla/gfx/gfxVars.h" #include "mozilla/ipc/CrossProcessSemaphore.h" #include "mozilla/ipc/SharedMemory.h" // for SharedMemory, etc +#include "mozilla/layers/CanvasRenderer.h" #include "mozilla/layers/CompositableForwarder.h" #include "mozilla/layers/ISurfaceAllocator.h" #include "mozilla/layers/ImageBridgeChild.h" @@ -375,7 +376,8 @@ TextureData* TextureData::Create(TextureForwarder* aAllocator, RefPtr canvasChild = aAllocator->GetCanvasChild(); if (canvasChild) { return new RecordedTextureData(canvasChild.forget(), aSize, aFormat, - textureType); + textureType, + layers::TexTypeForWebgl(aKnowsCompositor)); } // If we must be remote, but there is no canvas child, then falling back // is not possible. @@ -746,12 +748,10 @@ void TextureClient::ReadUnlock() { } bool TextureClient::Lock(OpenMode aMode) { - MOZ_ASSERT(IsValid()); - MOZ_ASSERT(!mIsLocked); - if (!IsValid()) { + if (NS_WARN_IF(!IsValid())) { return false; } - if (mIsLocked) { + if (NS_WARN_IF(mIsLocked)) { return mOpenMode == aMode; } -- cgit v1.2.3