mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 16:58:38 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
37a6e43c5d
7 changed files with 33 additions and 6 deletions
|
|
@ -134,6 +134,7 @@ WebGLBuffer::BufferData(GLenum target, size_t size, const void* data, GLenum usa
|
|||
if (error) {
|
||||
MOZ_ASSERT(error == LOCAL_GL_OUT_OF_MEMORY);
|
||||
mContext->ErrorOutOfMemory("%s: Error from driver: 0x%04x", funcName, error);
|
||||
mByteLength = 0;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -215,6 +215,16 @@ WebGLRenderbuffer::RenderbufferStorage(const char* funcName, uint32_t samples,
|
|||
if (error) {
|
||||
const char* errorName = mContext->ErrorName(error);
|
||||
mContext->GenerateWarning("%s generated error %s", funcName, errorName);
|
||||
if (error == LOCAL_GL_OUT_OF_MEMORY) {
|
||||
// Truncate.
|
||||
mSamples = 0;
|
||||
mFormat = nullptr;
|
||||
mWidth = 0;
|
||||
mHeight = 0;
|
||||
mImageDataStatus = WebGLImageDataStatus::NoImageData;
|
||||
|
||||
InvalidateStatusOfAttachedFBs();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,8 +51,6 @@ WebGLTexture::ImageInfo::Clear()
|
|||
WebGLTexture::ImageInfo&
|
||||
WebGLTexture::ImageInfo::operator =(const ImageInfo& a)
|
||||
{
|
||||
MOZ_ASSERT(a.IsDefined());
|
||||
|
||||
Mutable(mFormat) = a.mFormat;
|
||||
Mutable(mWidth) = a.mWidth;
|
||||
Mutable(mHeight) = a.mHeight;
|
||||
|
|
@ -1216,6 +1214,12 @@ WebGLTexture::TexParameter(TexTarget texTarget, GLenum pname, const FloatOrInt&
|
|||
mContext->gl->fTexParameterf(texTarget.get(), pname, clamped.f);
|
||||
}
|
||||
|
||||
void WebGLTexture::Truncate() {
|
||||
for (auto& cur : mImageInfoArr) {
|
||||
SetImageInfo(&cur, ImageInfo());
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_0(WebGLTexture)
|
||||
|
|
|
|||
|
|
@ -386,6 +386,7 @@ public:
|
|||
bool* const out_initFailed);
|
||||
|
||||
bool IsMipmapCubeComplete() const;
|
||||
void Truncate();
|
||||
|
||||
bool IsCubeMap() const { return (mTarget == LOCAL_GL_TEXTURE_CUBE_MAP); }
|
||||
|
||||
|
|
|
|||
|
|
@ -1178,6 +1178,7 @@ WebGLTexture::TexStorage(const char* funcName, TexTarget target, GLsizei levels,
|
|||
if (error == LOCAL_GL_OUT_OF_MEMORY) {
|
||||
mContext->ErrorOutOfMemory("%s: Ran out of memory during texture allocation.",
|
||||
funcName);
|
||||
Truncate();
|
||||
return;
|
||||
}
|
||||
if (error) {
|
||||
|
|
@ -1310,6 +1311,7 @@ WebGLTexture::TexImage(const char* funcName, TexImageTarget target, GLint level,
|
|||
if (glError == LOCAL_GL_OUT_OF_MEMORY) {
|
||||
mContext->ErrorOutOfMemory("%s: Driver ran out of memory during upload.",
|
||||
funcName);
|
||||
Truncate();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1398,6 +1400,7 @@ WebGLTexture::TexSubImage(const char* funcName, TexImageTarget target, GLint lev
|
|||
if (glError == LOCAL_GL_OUT_OF_MEMORY) {
|
||||
mContext->ErrorOutOfMemory("%s: Driver ran out of memory during upload.",
|
||||
funcName);
|
||||
Truncate();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1514,6 +1517,7 @@ WebGLTexture::CompressedTexImage(const char* funcName, TexImageTarget target, GL
|
|||
blob->mAvailBytes, blob->mPtr);
|
||||
if (error == LOCAL_GL_OUT_OF_MEMORY) {
|
||||
mContext->ErrorOutOfMemory("%s: Ran out of memory during upload.", funcName);
|
||||
Truncate();
|
||||
return;
|
||||
}
|
||||
if (error) {
|
||||
|
|
@ -1664,6 +1668,7 @@ WebGLTexture::CompressedTexSubImage(const char* funcName, TexImageTarget target,
|
|||
blob->mAvailBytes, blob->mPtr);
|
||||
if (error == LOCAL_GL_OUT_OF_MEMORY) {
|
||||
mContext->ErrorOutOfMemory("%s: Ran out of memory during upload.", funcName);
|
||||
Truncate();
|
||||
return;
|
||||
}
|
||||
if (error) {
|
||||
|
|
@ -1992,7 +1997,7 @@ WebGLTexture::ValidateCopyTexImageForFeedback(const char* funcName, uint32_t lev
|
|||
|
||||
static bool
|
||||
DoCopyTexOrSubImage(WebGLContext* webgl, const char* funcName, bool isSubImage,
|
||||
const WebGLTexture* tex, TexImageTarget target, GLint level,
|
||||
WebGLTexture* tex, TexImageTarget target, GLint level,
|
||||
GLint xWithinSrc, GLint yWithinSrc,
|
||||
uint32_t srcTotalWidth, uint32_t srcTotalHeight,
|
||||
const webgl::FormatUsageInfo* srcUsage,
|
||||
|
|
@ -2069,6 +2074,7 @@ DoCopyTexOrSubImage(WebGLContext* webgl, const char* funcName, bool isSubImage,
|
|||
|
||||
if (error == LOCAL_GL_OUT_OF_MEMORY) {
|
||||
webgl->ErrorOutOfMemory("%s: Ran out of memory during texture copy.", funcName);
|
||||
tex->Truncate();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -504,9 +504,13 @@ nsHttpConnectionMgr::UpdateParam(nsParamName name, uint16_t value)
|
|||
}
|
||||
|
||||
nsresult
|
||||
nsHttpConnectionMgr::ProcessPendingQ(nsHttpConnectionInfo *ci)
|
||||
nsHttpConnectionMgr::ProcessPendingQ(nsHttpConnectionInfo* aCI)
|
||||
{
|
||||
LOG(("nsHttpConnectionMgr::ProcessPendingQ [ci=%s]\n", ci->HashKey().get()));
|
||||
LOG(("nsHttpConnectionMgr::ProcessPendingQ [ci=%s]\n", aCI->HashKey().get()));
|
||||
RefPtr<nsHttpConnectionInfo> ci;
|
||||
if (aCI) {
|
||||
ci = aCI->Clone();
|
||||
}
|
||||
return PostEvent(&nsHttpConnectionMgr::OnMsgProcessPendingQ, 0, ci);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,8 @@ public:
|
|||
uint32_t caps = 0)
|
||||
{
|
||||
TickleWifi(callbacks);
|
||||
return mConnMgr->SpeculativeConnect(ci, callbacks, caps);
|
||||
RefPtr<nsHttpConnectionInfo> clone = ci->Clone();
|
||||
return mConnMgr->SpeculativeConnect(clone, callbacks, caps);
|
||||
}
|
||||
|
||||
// Alternate Services Maps are main thread only
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue