Bug 1829026 - Remove unused ClientWebGLContext local extensions. r=jgilbert,aosmond

DrawTargetWebgl is transitioning away from using ClientWebGLContext, so
local extensions that were added to support that use-case are no longer necessary.

Differential Revision: https://phabricator.services.mozilla.com/D194346
This commit is contained in:
Lee Salzman
2023-12-12 07:35:01 +00:00
parent bcee3c63b8
commit 5e38cdd61d
2 changed files with 0 additions and 91 deletions

View File

@@ -3494,27 +3494,8 @@ void ClientWebGLContext::BufferData(GLenum target,
});
}
void ClientWebGLContext::RawBufferData(GLenum target, const uint8_t* srcBytes,
size_t srcLen, GLenum usage) {
const FuncScope funcScope(*this, "bufferData");
const auto srcBuffer =
srcBytes ? RawBuffer<>({srcBytes, srcLen}) : RawBuffer<>(srcLen);
Run<RPROC(BufferData)>(target, srcBuffer, usage);
}
////
void ClientWebGLContext::RawBufferSubData(GLenum target,
WebGLsizeiptr dstByteOffset,
const uint8_t* srcBytes,
size_t srcLen, bool unsynchronized) {
const FuncScope funcScope(*this, "bufferSubData");
Run<RPROC(BufferSubData)>(target, dstByteOffset,
RawBuffer<>({srcBytes, srcLen}), unsynchronized);
}
void ClientWebGLContext::BufferSubData(GLenum target,
WebGLsizeiptr dstByteOffset,
const dom::ArrayBuffer& src) {
@@ -4573,38 +4554,6 @@ void ClientWebGLContext::TexImage(uint8_t funcDims, GLenum imageTarget,
}
}
void ClientWebGLContext::RawTexImage(uint32_t level, GLenum respecFormat,
uvec3 offset, const webgl::PackingInfo& pi,
webgl::TexUnpackBlobDesc&& desc) const {
const FuncScope funcScope(*this, "tex(Sub)Image[23]D");
if (IsContextLost()) return;
if (desc.sd) {
// Shmems are stored in Buffer surface descriptors. We need to ensure first
// that all queued commands are flushed and then send the Shmem over IPDL.
const auto& sd = *(desc.sd);
if (sd.type() == layers::SurfaceDescriptor::TSurfaceDescriptorBuffer &&
sd.get_SurfaceDescriptorBuffer().data().type() ==
layers::MemoryOrShmem::TShmem) {
const auto& inProcess = mNotLost->inProcess;
if (inProcess) {
inProcess->TexImage(level, respecFormat, offset, pi, desc);
} else {
const auto& child = mNotLost->outOfProcess;
child->FlushPendingCmds();
(void)child->SendTexImage(level, respecFormat, offset, pi,
std::move(desc));
}
} else {
NS_WARNING(
"RawTexImage with SurfaceDescriptor only supports "
"SurfaceDescriptorBuffer with Shmem");
}
return;
}
Run<RPROC(TexImage)>(level, respecFormat, offset, pi, desc);
}
// -
void ClientWebGLContext::CompressedTexImage(bool sub, uint8_t funcDims,
@@ -5207,30 +5156,6 @@ bool ClientWebGLContext::DoReadPixels(const webgl::ReadPixelsDesc& desc,
return true;
}
bool ClientWebGLContext::DoReadPixels(const webgl::ReadPixelsDesc& desc,
const mozilla::ipc::Shmem& shmem) const {
const auto notLost =
mNotLost; // Hold a strong-ref to prevent LoseContext=>UAF.
if (!notLost) return false;
const auto& inProcess = notLost->inProcess;
if (inProcess) {
const auto& shmemBytes = shmem.Range<uint8_t>();
inProcess->ReadPixelsInto(desc, shmemBytes);
return true;
}
const auto& child = notLost->outOfProcess;
child->FlushPendingCmds();
webgl::ReadPixelsResultIpc res = {};
// We assume the input is an unsafe shmem which won't be consumed by this
// request. Since SendReadPixels expects a Shmem rvalue, we must create a copy
// to provide it that can be consumed instead of the original descriptor.
mozilla::ipc::Shmem dest = shmem;
if (!child->SendReadPixels(desc, dest, &res)) {
res = {};
}
return res.byteStride > 0;
}
bool ClientWebGLContext::ReadPixels_SharedPrecheck(
dom::CallerType aCallerType, ErrorResult& out_error) const {
if (IsContextLost()) return false;