mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
Bug 1268638 - Bitrot.
MozReview-Commit-ID: QJjb2PW5C4
This commit is contained in:
parent
e266a0fe97
commit
96dc6afb76
@ -591,15 +591,16 @@ CreateGLWithEGL(const gl::SurfaceCaps& caps, gl::CreateContextFlags flags,
|
||||
std::vector<WebGLContext::FailureReason>* const out_failReasons)
|
||||
{
|
||||
const gfx::IntSize dummySize(16, 16);
|
||||
nsCString failureId;
|
||||
RefPtr<GLContext> gl = gl::GLContextProviderEGL::CreateOffscreen(dummySize, caps,
|
||||
flags, out_failureId);
|
||||
flags, &failureId);
|
||||
if (gl && gl->IsANGLE()) {
|
||||
gl = nullptr;
|
||||
}
|
||||
|
||||
if (!gl) {
|
||||
out_failReasons->push_back(WebGLContext::FailureReason(
|
||||
"FEATURE_FAILURE_WEBGL_EGL_INIT",
|
||||
failureId,
|
||||
"Error during EGL OpenGL init."
|
||||
));
|
||||
return nullptr;
|
||||
@ -614,15 +615,16 @@ CreateGLWithANGLE(const gl::SurfaceCaps& caps, gl::CreateContextFlags flags,
|
||||
std::vector<WebGLContext::FailureReason>* const out_failReasons)
|
||||
{
|
||||
const gfx::IntSize dummySize(16, 16);
|
||||
nsCString failureId;
|
||||
RefPtr<GLContext> gl = gl::GLContextProviderEGL::CreateOffscreen(dummySize, caps,
|
||||
flags, out_failureId);
|
||||
flags, &failureId);
|
||||
if (gl && !gl->IsANGLE()) {
|
||||
gl = nullptr;
|
||||
}
|
||||
|
||||
if (!gl) {
|
||||
out_failReasons->push_back(WebGLContext::FailureReason(
|
||||
"FEATURE_FAILURE_WEBGL_ANGLE_INIT",
|
||||
failureId,
|
||||
"Error during ANGLE OpenGL init."
|
||||
));
|
||||
return nullptr;
|
||||
@ -637,8 +639,9 @@ CreateGLWithDefault(const gl::SurfaceCaps& caps, gl::CreateContextFlags flags,
|
||||
std::vector<WebGLContext::FailureReason>* const out_failReasons)
|
||||
{
|
||||
const gfx::IntSize dummySize(16, 16);
|
||||
nsCString failureId;
|
||||
RefPtr<GLContext> gl = gl::GLContextProvider::CreateOffscreen(dummySize, caps,
|
||||
flags, out_failureId);
|
||||
flags, &failureId);
|
||||
|
||||
if (gl && gl->IsANGLE()) {
|
||||
gl = nullptr;
|
||||
@ -646,7 +649,7 @@ CreateGLWithDefault(const gl::SurfaceCaps& caps, gl::CreateContextFlags flags,
|
||||
|
||||
if (!gl) {
|
||||
out_failReasons->push_back(WebGLContext::FailureReason(
|
||||
"FEATURE_FAILURE_WEBGL_DEFAULT_INIT",
|
||||
failureId,
|
||||
"Error during native OpenGL init."
|
||||
));
|
||||
return nullptr;
|
||||
@ -740,7 +743,7 @@ WebGLContext::CreateAndInitGL(bool forceEnabled,
|
||||
}
|
||||
#endif
|
||||
if (tryNativeGL) {
|
||||
if (CreateAndInitGLWith(CreateGLWithNative, baseCaps, flags, out_failReasons))
|
||||
if (CreateAndInitGLWith(CreateGLWithDefault, baseCaps, flags, out_failReasons))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -986,6 +989,7 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
#ifdef XP_WIN
|
||||
if (gl->GetContextType() == gl::GLContextType::WGL &&
|
||||
!gl::sWGLLib.HasDXInterop2())
|
||||
{
|
||||
@ -995,6 +999,7 @@ WebGLContext::SetDimensions(int32_t signedWidth, int32_t signedHeight)
|
||||
ThrowEvent_WebGLContextCreationError(text);
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!ResizeBackbuffer(width, height)) {
|
||||
|
@ -1122,19 +1122,19 @@ GfxInfo::GetGfxDriverInfo()
|
||||
// WebGL
|
||||
|
||||
// Older than 5-15-2016
|
||||
APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL,
|
||||
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows,
|
||||
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorAMD), GfxDriverInfo::allDevices,
|
||||
nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED, DRIVER_LESS_THAN,
|
||||
V(16,200,1010,1002), "WEBGL_NATIVE_GL_OLD_AMD");
|
||||
|
||||
// Older than 11-18-2015
|
||||
APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL,
|
||||
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows,
|
||||
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorIntel), GfxDriverInfo::allDevices,
|
||||
nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED, DRIVER_LESS_THAN,
|
||||
V(20,19,15,4331), "WEBGL_NATIVE_GL_OLD_INTEL");
|
||||
|
||||
// Older than 2-23-2016
|
||||
APPEND_TO_DRIVER_BLOCKLIST2(DRIVER_OS_ALL,
|
||||
APPEND_TO_DRIVER_BLOCKLIST2(OperatingSystem::Windows,
|
||||
(nsAString&) GfxDriverInfo::GetDeviceVendor(VendorNVIDIA), GfxDriverInfo::allDevices,
|
||||
nsIGfxInfo::FEATURE_WEBGL_OPENGL, nsIGfxInfo::FEATURE_DISCOURAGED, DRIVER_LESS_THAN,
|
||||
V(10,18,13,6200), "WEBGL_NATIVE_GL_OLD_NVIDIA");
|
||||
|
Loading…
Reference in New Issue
Block a user