summaryrefslogtreecommitdiffstats
path: root/gfx/layers/client
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /gfx/layers/client
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz
firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gfx/layers/client')
-rw-r--r--gfx/layers/client/TextureClient.cpp10
-rw-r--r--gfx/layers/client/TextureRecorded.cpp5
-rw-r--r--gfx/layers/client/TextureRecorded.h3
3 files changed, 10 insertions, 8 deletions
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> 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;
}
diff --git a/gfx/layers/client/TextureRecorded.cpp b/gfx/layers/client/TextureRecorded.cpp
index 7e7ee2da99..da4ca4f8f3 100644
--- a/gfx/layers/client/TextureRecorded.cpp
+++ b/gfx/layers/client/TextureRecorded.cpp
@@ -23,9 +23,10 @@ static int64_t sNextRecordedTextureId = 0;
RecordedTextureData::RecordedTextureData(
already_AddRefed<CanvasChild> aCanvasChild, gfx::IntSize aSize,
- gfx::SurfaceFormat aFormat, TextureType aTextureType)
+ gfx::SurfaceFormat aFormat, TextureType aTextureType,
+ TextureType aWebglTextureType)
: mCanvasChild(aCanvasChild), mSize(aSize), mFormat(aFormat) {
- mCanvasChild->EnsureRecorder(aSize, aFormat, aTextureType);
+ mCanvasChild->EnsureRecorder(aSize, aFormat, aTextureType, aWebglTextureType);
}
RecordedTextureData::~RecordedTextureData() {
diff --git a/gfx/layers/client/TextureRecorded.h b/gfx/layers/client/TextureRecorded.h
index d846c1fac1..56e504fb54 100644
--- a/gfx/layers/client/TextureRecorded.h
+++ b/gfx/layers/client/TextureRecorded.h
@@ -18,7 +18,8 @@ class RecordedTextureData final : public TextureData {
public:
RecordedTextureData(already_AddRefed<CanvasChild> aCanvasChild,
gfx::IntSize aSize, gfx::SurfaceFormat aFormat,
- TextureType aTextureType);
+ TextureType aTextureType,
+ TextureType aWebglTextureType = TextureType::Unknown);
void FillInfo(TextureData::Info& aInfo) const final;