mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1106138 - Remove the early unpremultiply in WebGLContext::SurfaceFromElementResultToImageSurface, and let the texel conversion code handle it instead. r=jgilbert
This commit is contained in:
parent
b3d249d3b0
commit
f300a1992f
@ -1967,7 +1967,7 @@ WebGLContext::TexSubImage2D(GLenum rawTexImageTarget, GLint level, GLint xoffset
|
||||
TexSubImage2D_base(texImageTarget.get(), level, xoffset, yoffset, size.width,
|
||||
size.height, data->Stride(), format, type, data->GetData(),
|
||||
byteLength, js::Scalar::MaxTypedArrayViewType, srcFormat,
|
||||
mPixelStorePremultiplyAlpha);
|
||||
res.mIsPremultiplied);
|
||||
}
|
||||
|
||||
size_t
|
||||
|
@ -627,7 +627,7 @@ public:
|
||||
size.width, size.height, data->Stride(), 0,
|
||||
format, type, data->GetData(), byteLength,
|
||||
js::Scalar::MaxTypedArrayViewType, srcFormat,
|
||||
mPixelStorePremultiplyAlpha);
|
||||
res.mIsPremultiplied);
|
||||
}
|
||||
|
||||
void TexParameterf(GLenum target, GLenum pname, GLfloat param) {
|
||||
|
@ -2492,20 +2492,6 @@ WebGLContext::SurfaceFromElementResultToImageSurface(nsLayoutUtils::SurfaceFromE
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!mPixelStorePremultiplyAlpha && res.mIsPremultiplied) {
|
||||
switch (data->GetFormat()) {
|
||||
case SurfaceFormat::B8G8R8X8:
|
||||
// No alpha, so de-facto premult'd.
|
||||
break;
|
||||
case SurfaceFormat::B8G8R8A8:
|
||||
data = gfxUtils::CreateUnpremultipliedDataSurface(data);
|
||||
break;
|
||||
default:
|
||||
MOZ_ASSERT(false, "Format unsupported.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// We disallow loading cross-domain images and videos that have not been validated
|
||||
// with CORS as WebGL textures. The reason for doing that is that timing
|
||||
// attacks on WebGL shaders are able to retrieve approximations of the
|
||||
|
Loading…
Reference in New Issue
Block a user