зеркало из https://github.com/mozilla/gecko-dev.git
Fix for 686083: Adds method to disable GL implementations
This commit is contained in:
Родитель
9139d5704e
Коммит
b9460bc0eb
|
@ -46,6 +46,7 @@
|
|||
#include "gfxPlatform.h"
|
||||
#include "gfxFailure.h"
|
||||
#include "prenv.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace gl {
|
||||
|
@ -559,6 +560,10 @@ GLContextProviderCGL::CreateOffscreen(const gfxIntSize& aSize,
|
|||
{
|
||||
nsRefPtr<GLContextCGL> glContext;
|
||||
|
||||
NS_ENSURE_TRUE(Preferences::GetRootBranch(), nsnull);
|
||||
const bool preferFBOs = Preferences::GetBool("cgl.prefer-fbo", false);
|
||||
if (!preferFBOs)
|
||||
{
|
||||
glContext = CreateOffscreenPBufferContext(aSize, aFormat);
|
||||
if (glContext &&
|
||||
glContext->Init())
|
||||
|
@ -568,6 +573,7 @@ GLContextProviderCGL::CreateOffscreen(const gfxIntSize& aSize,
|
|||
|
||||
return glContext.forget();
|
||||
}
|
||||
}
|
||||
|
||||
// try a FBO as second choice
|
||||
glContext = CreateOffscreenFBOContext(aSize, aFormat);
|
||||
|
|
|
@ -48,6 +48,8 @@
|
|||
|
||||
#include "prenv.h"
|
||||
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace gl {
|
||||
|
||||
|
@ -616,7 +618,10 @@ GLContextProviderWGL::CreateOffscreen(const gfxIntSize& aSize,
|
|||
|
||||
// Always try to create a pbuffer context first, because we
|
||||
// want the context isolation.
|
||||
if (sWGLLibrary.fCreatePbuffer &&
|
||||
NS_ENSURE_TRUE(Preferences::GetRootBranch(), nsnull);
|
||||
const bool preferFBOs = Preferences::GetBool("wgl.prefer-fbo", false);
|
||||
if (!preferFBOs &&
|
||||
sWGLLibrary.fCreatePbuffer &&
|
||||
sWGLLibrary.fChoosePixelFormat)
|
||||
{
|
||||
glContext = CreatePBufferOffscreenContext(aSize, aFormat);
|
||||
|
|
Загрузка…
Ссылка в новой задаче