зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 6 changesets (bug 1150944, bug 1034370) for build failures in WebGLContext.cpp CLOSED TREE
Backed out changeset e2a6160242e5 (bug 1150944) Backed out changeset 1c510537d20b (bug 1150944) Backed out changeset 7ae813666ed5 (bug 1150944) Backed out changeset 2f29ac2e31cd (bug 1150944) Backed out changeset bf7681b1567e (bug 1150944) Backed out changeset 79c6b8d014d2 (bug 1034370)
This commit is contained in:
Родитель
309a57122b
Коммит
ec1078c65a
|
@ -859,9 +859,6 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(CanvasRenderingContext2D)
|
|||
NS_IMPL_CYCLE_COLLECTION_CLASS(CanvasRenderingContext2D)
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(CanvasRenderingContext2D)
|
||||
// Make sure we remove ourselves from the list of demotable contexts (raw pointers),
|
||||
// since we're logically destructed at this point.
|
||||
CanvasRenderingContext2D::RemoveDemotableContext(tmp);
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mCanvasElement)
|
||||
for (uint32_t i = 0; i < tmp->mStyleStack.Length(); i++) {
|
||||
ImplCycleCollectionUnlink(tmp->mStyleStack[i].patternStyles[Style::STROKE]);
|
||||
|
@ -1241,10 +1238,6 @@ void CanvasRenderingContext2D::Demote()
|
|||
std::vector<CanvasRenderingContext2D*>&
|
||||
CanvasRenderingContext2D::DemotableContexts()
|
||||
{
|
||||
// This is a list of raw pointers to cycle-collected objects. We need to ensure
|
||||
// that we remove elements from it during UNLINK (which can happen considerably before
|
||||
// the actual destructor) since the object is logically destroyed at that point
|
||||
// and will be in an inconsistant state.
|
||||
static std::vector<CanvasRenderingContext2D*> contexts;
|
||||
return contexts;
|
||||
}
|
||||
|
|
|
@ -685,9 +685,6 @@ protected:
|
|||
return CurrentState().font;
|
||||
}
|
||||
|
||||
// This function maintains a list of raw pointers to cycle-collected
|
||||
// objects. We need to ensure that no entries persist beyond unlink,
|
||||
// since the objects are logically destructed at that point.
|
||||
static std::vector<CanvasRenderingContext2D*>& DemotableContexts();
|
||||
static void DemoteOldestContextIfNecessary();
|
||||
|
||||
|
|
|
@ -539,10 +539,10 @@ HasAcceleratedLayers(const nsCOMPtr<nsIGfxInfo>& gfxInfo)
|
|||
}
|
||||
|
||||
static already_AddRefed<GLContext>
|
||||
CreateHeadlessNativeGL(CreateContextFlags flags, const nsCOMPtr<nsIGfxInfo>& gfxInfo,
|
||||
WebGLContext* webgl)
|
||||
CreateHeadlessNativeGL(bool forceEnabled, const nsCOMPtr<nsIGfxInfo>& gfxInfo,
|
||||
bool requireCompatProfile, WebGLContext* webgl)
|
||||
{
|
||||
if (!(flags & CreateContextFlags::FORCE_ENABLE_HARDWARE) &&
|
||||
if (!forceEnabled &&
|
||||
IsFeatureInBlacklist(gfxInfo, nsIGfxInfo::FEATURE_WEBGL_OPENGL))
|
||||
{
|
||||
webgl->GenerateWarning("Refused to create native OpenGL context"
|
||||
|
@ -550,7 +550,7 @@ CreateHeadlessNativeGL(CreateContextFlags flags, const nsCOMPtr<nsIGfxInfo>& gfx
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
nsRefPtr<GLContext> gl = gl::GLContextProvider::CreateHeadless(flags);
|
||||
nsRefPtr<GLContext> gl = gl::GLContextProvider::CreateHeadless(requireCompatProfile);
|
||||
if (!gl) {
|
||||
webgl->GenerateWarning("Error during native OpenGL init.");
|
||||
return nullptr;
|
||||
|
@ -564,8 +564,8 @@ CreateHeadlessNativeGL(CreateContextFlags flags, const nsCOMPtr<nsIGfxInfo>& gfx
|
|||
// right now, we get ANGLE implicitly by using EGL on Windows.
|
||||
// Eventually, we want to be able to pick ANGLE-EGL or native EGL.
|
||||
static already_AddRefed<GLContext>
|
||||
CreateHeadlessANGLE(CreateContextFlags flags, const nsCOMPtr<nsIGfxInfo>& gfxInfo,
|
||||
WebGLContext* webgl)
|
||||
CreateHeadlessANGLE(bool forceEnabled, const nsCOMPtr<nsIGfxInfo>& gfxInfo,
|
||||
bool requireCompatProfile, WebGLContext* webgl)
|
||||
{
|
||||
nsRefPtr<GLContext> gl;
|
||||
|
||||
|
@ -583,12 +583,13 @@ CreateHeadlessANGLE(CreateContextFlags flags, const nsCOMPtr<nsIGfxInfo>& gfxInf
|
|||
}
|
||||
|
||||
static already_AddRefed<GLContext>
|
||||
CreateHeadlessEGL(CreateContextFlags flags, WebGLContext* webgl)
|
||||
CreateHeadlessEGL(bool forceEnabled, bool requireCompatProfile,
|
||||
WebGLContext* webgl)
|
||||
{
|
||||
nsRefPtr<GLContext> gl;
|
||||
|
||||
#ifdef ANDROID
|
||||
gl = gl::GLContextProviderEGL::CreateHeadless(flags);
|
||||
gl = gl::GLContextProviderEGL::CreateHeadless(requireCompatProfile);
|
||||
if (!gl) {
|
||||
webgl->GenerateWarning("Error during EGL OpenGL init.");
|
||||
return nullptr;
|
||||
|
@ -600,7 +601,7 @@ CreateHeadlessEGL(CreateContextFlags flags, WebGLContext* webgl)
|
|||
}
|
||||
|
||||
static already_AddRefed<GLContext>
|
||||
CreateHeadlessGL(CreateContextFlags flags, const nsCOMPtr<nsIGfxInfo>& gfxInfo,
|
||||
CreateHeadlessGL(bool forceEnabled, const nsCOMPtr<nsIGfxInfo>& gfxInfo,
|
||||
WebGLContext* webgl)
|
||||
{
|
||||
bool preferEGL = PR_GetEnv("MOZ_WEBGL_PREFER_EGL");
|
||||
|
@ -609,21 +610,21 @@ CreateHeadlessGL(CreateContextFlags flags, const nsCOMPtr<nsIGfxInfo>& gfxInfo,
|
|||
if (PR_GetEnv("MOZ_WEBGL_FORCE_OPENGL"))
|
||||
disableANGLE = true;
|
||||
|
||||
if (!webgl->IsWebGL2()) {
|
||||
flags |= CreateContextFlags::REQUIRE_COMPAT_PROFILE;
|
||||
}
|
||||
bool requireCompatProfile = webgl->IsWebGL2() ? false : true;
|
||||
|
||||
nsRefPtr<GLContext> gl;
|
||||
|
||||
if (preferEGL)
|
||||
gl = CreateHeadlessEGL(flags, webgl);
|
||||
gl = CreateHeadlessEGL(forceEnabled, requireCompatProfile, webgl);
|
||||
|
||||
if (!gl && !disableANGLE) {
|
||||
gl = CreateHeadlessANGLE(flags, gfxInfo, webgl);
|
||||
gl = CreateHeadlessANGLE(forceEnabled, gfxInfo, requireCompatProfile,
|
||||
webgl);
|
||||
}
|
||||
|
||||
if (!gl) {
|
||||
gl = CreateHeadlessNativeGL(flags, gfxInfo, webgl);
|
||||
gl = CreateHeadlessNativeGL(forceEnabled, gfxInfo,
|
||||
requireCompatProfile, webgl);
|
||||
}
|
||||
|
||||
return gl.forget();
|
||||
|
@ -748,10 +749,7 @@ WebGLContext::CreateOffscreenGL(bool forceEnabled)
|
|||
}
|
||||
#endif
|
||||
|
||||
CreateContextFlags flags = forceEnabled ? CreateContextFlags::FORCE_ENABLE_HARDWARE :
|
||||
CreateContextFlags::NONE;
|
||||
|
||||
gl = CreateHeadlessGL(flags, gfxInfo, this);
|
||||
gl = CreateHeadlessGL(forceEnabled, gfxInfo, this);
|
||||
|
||||
do {
|
||||
if (!gl)
|
||||
|
|
|
@ -186,7 +186,7 @@ protected:
|
|||
return true;
|
||||
}
|
||||
|
||||
mGLContext = GLContextProvider::CreateHeadless(CreateContextFlags::NONE);
|
||||
mGLContext = GLContextProvider::CreateHeadless(false);
|
||||
return mGLContext;
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,8 @@ static nsRefPtr<GLContext> sPluginContext = nullptr;
|
|||
static bool EnsureGLContext()
|
||||
{
|
||||
if (!sPluginContext) {
|
||||
sPluginContext = GLContextProvider::CreateHeadless(CreateContextFlags::REQUIRE_COMPAT_PROFILE);
|
||||
bool requireCompatProfile = true;
|
||||
sPluginContext = GLContextProvider::CreateHeadless(requireCompatProfile);
|
||||
}
|
||||
|
||||
return sPluginContext != nullptr;
|
||||
|
|
|
@ -430,11 +430,11 @@ DrawTargetSkia::DrawSurfaceWithShadow(SourceSurface *aSurface,
|
|||
|
||||
SkPaint paint;
|
||||
|
||||
SkAutoTUnref<SkImageFilter> filter(SkDropShadowImageFilter::Create(aOffset.x, aOffset.y,
|
||||
SkImageFilter* filter = SkDropShadowImageFilter::Create(aOffset.x, aOffset.y,
|
||||
aSigma, aSigma,
|
||||
ColorToSkColor(aColor, 1.0)));
|
||||
ColorToSkColor(aColor, 1.0));
|
||||
|
||||
paint.setImageFilter(filter.get());
|
||||
paint.setImageFilter(filter);
|
||||
paint.setXfermodeMode(GfxOpToSkiaOp(aOperator));
|
||||
|
||||
mCanvas->drawBitmap(bitmap.mBitmap, aDest.x, aDest.y, &paint);
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "GLContextTypes.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "SurfaceTypes.h"
|
||||
#include "mozilla/TypedEnumBits.h"
|
||||
|
||||
#include "nsSize.h" // for gfx::IntSize (needed by GLContextProviderImpl.h below)
|
||||
|
||||
|
@ -18,16 +17,6 @@ class nsIWidget;
|
|||
namespace mozilla {
|
||||
namespace gl {
|
||||
|
||||
enum class CreateContextFlags : int8_t {
|
||||
NONE = 0,
|
||||
REQUIRE_COMPAT_PROFILE = 1 << 0,
|
||||
// Force the use of hardware backed GL, don't allow software implementations.
|
||||
FORCE_ENABLE_HARDWARE = 1 << 1,
|
||||
/* Don't force discrete GPU to be used (if applicable) */
|
||||
ALLOW_OFFLINE_RENDERER = 1 << 2,
|
||||
};
|
||||
MOZ_MAKE_ENUM_CLASS_BITWISE_OPERATORS(CreateContextFlags)
|
||||
|
||||
#define IN_GL_CONTEXT_PROVIDER_H
|
||||
|
||||
// Null is always there
|
||||
|
|
|
@ -187,11 +187,6 @@ static const NSOpenGLPixelFormatAttribute kAttribs_offscreen[] = {
|
|||
0
|
||||
};
|
||||
|
||||
static const NSOpenGLPixelFormatAttribute kAttribs_offscreen_allow_offline[] = {
|
||||
NSOpenGLPFAAllowOfflineRenderers,
|
||||
0
|
||||
};
|
||||
|
||||
static const NSOpenGLPixelFormatAttribute kAttribs_offscreen_accel[] = {
|
||||
NSOpenGLPFAAccelerated,
|
||||
0
|
||||
|
@ -258,7 +253,7 @@ GLContextProviderCGL::CreateForWindow(nsIWidget *aWidget)
|
|||
}
|
||||
|
||||
static already_AddRefed<GLContextCGL>
|
||||
CreateOffscreenFBOContext(CreateContextFlags flags)
|
||||
CreateOffscreenFBOContext(bool requireCompatProfile)
|
||||
{
|
||||
if (!sCGLLibrary.EnsureInitialized()) {
|
||||
return nullptr;
|
||||
|
@ -267,26 +262,18 @@ CreateOffscreenFBOContext(CreateContextFlags flags)
|
|||
ContextProfile profile;
|
||||
NSOpenGLContext* context = nullptr;
|
||||
|
||||
if (!(flags & CreateContextFlags::REQUIRE_COMPAT_PROFILE)) {
|
||||
if (!requireCompatProfile) {
|
||||
profile = ContextProfile::OpenGLCore;
|
||||
context = CreateWithFormat(kAttribs_offscreen_coreProfile);
|
||||
}
|
||||
if (!context) {
|
||||
profile = ContextProfile::OpenGLCompatibility;
|
||||
|
||||
if (flags & CreateContextFlags::ALLOW_OFFLINE_RENDERER) {
|
||||
if (gfxPrefs::RequireHardwareGL())
|
||||
context = CreateWithFormat(kAttribs_singleBuffered);
|
||||
else
|
||||
context = CreateWithFormat(kAttribs_offscreen_allow_offline);
|
||||
|
||||
} else {
|
||||
if (gfxPrefs::RequireHardwareGL())
|
||||
context = CreateWithFormat(kAttribs_offscreen_accel);
|
||||
else
|
||||
context = CreateWithFormat(kAttribs_offscreen);
|
||||
}
|
||||
}
|
||||
if (!context) {
|
||||
NS_WARNING("Failed to create NSOpenGLContext.");
|
||||
return nullptr;
|
||||
|
@ -300,10 +287,10 @@ CreateOffscreenFBOContext(CreateContextFlags flags)
|
|||
}
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderCGL::CreateHeadless(CreateContextFlags flags)
|
||||
GLContextProviderCGL::CreateHeadless(bool requireCompatProfile, bool forceEnabled)
|
||||
{
|
||||
nsRefPtr<GLContextCGL> gl;
|
||||
gl = CreateOffscreenFBOContext(flags);
|
||||
gl = CreateOffscreenFBOContext(requireCompatProfile);
|
||||
if (!gl)
|
||||
return nullptr;
|
||||
|
||||
|
@ -318,9 +305,9 @@ GLContextProviderCGL::CreateHeadless(CreateContextFlags flags)
|
|||
already_AddRefed<GLContext>
|
||||
GLContextProviderCGL::CreateOffscreen(const IntSize& size,
|
||||
const SurfaceCaps& caps,
|
||||
CreateContextFlags flags)
|
||||
bool requireCompatProfile)
|
||||
{
|
||||
nsRefPtr<GLContext> glContext = CreateHeadless(flags);
|
||||
nsRefPtr<GLContext> glContext = CreateHeadless(requireCompatProfile);
|
||||
if (!glContext->InitOffscreen(size, caps)) {
|
||||
NS_WARNING("Failed during InitOffscreen.");
|
||||
return nullptr;
|
||||
|
@ -343,7 +330,7 @@ GLContextProviderCGL::GetGlobalContext()
|
|||
// than 16x16 in size; also 16x16 is POT so that we can do
|
||||
// a FBO with it on older video cards. A FBO context for
|
||||
// sharing is preferred since it has no associated target.
|
||||
gGlobalContext = CreateOffscreenFBOContext(CreateContextFlags::NONE);
|
||||
gGlobalContext = CreateOffscreenFBOContext(false);
|
||||
if (!gGlobalContext || !static_cast<GLContextCGL*>(gGlobalContext.get())->Init()) {
|
||||
NS_WARNING("Couldn't init gGlobalContext.");
|
||||
gGlobalContext = nullptr;
|
||||
|
|
|
@ -933,9 +933,9 @@ GLContextEGL::CreateEGLPixmapOffscreenContext(const mozilla::gfx::IntSize& size)
|
|||
}
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderEGL::CreateHeadless(CreateContextFlags flags)
|
||||
GLContextProviderEGL::CreateHeadless(bool requireCompatProfile, bool forceEnabled)
|
||||
{
|
||||
if (!sEGLLibrary.EnsureInitialized(flags & CreateContextFlags::FORCE_ENABLE_HARDWARE)) {
|
||||
if (!sEGLLibrary.EnsureInitialized(forceEnabled)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -953,9 +953,9 @@ GLContextProviderEGL::CreateHeadless(CreateContextFlags flags)
|
|||
already_AddRefed<GLContext>
|
||||
GLContextProviderEGL::CreateOffscreen(const mozilla::gfx::IntSize& size,
|
||||
const SurfaceCaps& caps,
|
||||
CreateContextFlags flags)
|
||||
bool requireCompatProfile)
|
||||
{
|
||||
nsRefPtr<GLContext> glContext = CreateHeadless(flags);
|
||||
nsRefPtr<GLContext> glContext = CreateHeadless(requireCompatProfile);
|
||||
if (!glContext)
|
||||
return nullptr;
|
||||
|
||||
|
|
|
@ -1215,7 +1215,7 @@ DONE_CREATING_PIXMAP:
|
|||
}
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderGLX::CreateHeadless(CreateContextFlags)
|
||||
GLContextProviderGLX::CreateHeadless(bool requireCompatProfile, bool forceEnabled)
|
||||
{
|
||||
IntSize dummySize = IntSize(16, 16);
|
||||
nsRefPtr<GLContext> glContext = CreateOffscreenPixmapContext(dummySize);
|
||||
|
@ -1228,9 +1228,9 @@ GLContextProviderGLX::CreateHeadless(CreateContextFlags)
|
|||
already_AddRefed<GLContext>
|
||||
GLContextProviderGLX::CreateOffscreen(const IntSize& size,
|
||||
const SurfaceCaps& caps,
|
||||
CreateContextFlags flags)
|
||||
bool requireCompatProfile)
|
||||
{
|
||||
nsRefPtr<GLContext> glContext = CreateHeadless(flags);
|
||||
nsRefPtr<GLContext> glContext = CreateHeadless(requireCompatProfile);
|
||||
if (!glContext)
|
||||
return nullptr;
|
||||
|
||||
|
|
|
@ -54,21 +54,19 @@ public:
|
|||
* resource sharing can be avoided on the target platform, it will
|
||||
* be, in order to isolate the offscreen context.
|
||||
*
|
||||
* @param size The initial size of this offscreen context.
|
||||
* @param caps The SurfaceCaps for this offscreen context.
|
||||
* @param flags The set of CreateContextFlags to be used for this
|
||||
* offscreen context.
|
||||
* @param aSize The initial size of this offscreen context.
|
||||
* @param aFormat The ContextFormat for this offscreen context.
|
||||
*
|
||||
* @return Context to use for offscreen rendering
|
||||
*/
|
||||
static already_AddRefed<GLContext>
|
||||
CreateOffscreen(const mozilla::gfx::IntSize& size,
|
||||
const SurfaceCaps& caps,
|
||||
CreateContextFlags flags);
|
||||
bool requireCompatProfile);
|
||||
|
||||
// Just create a context. We'll add offscreen stuff ourselves.
|
||||
static already_AddRefed<GLContext>
|
||||
CreateHeadless(CreateContextFlags flags);
|
||||
CreateHeadless(bool requireCompatProfile, bool forceEnabled = false);
|
||||
|
||||
/**
|
||||
* Create wrapping Gecko GLContext for external gl context.
|
||||
|
|
|
@ -23,13 +23,13 @@ GLContextProviderNull::CreateWrappingExisting(void*, void*)
|
|||
already_AddRefed<GLContext>
|
||||
GLContextProviderNull::CreateOffscreen(const gfx::IntSize&,
|
||||
const SurfaceCaps&,
|
||||
CreateContextFlags)
|
||||
bool)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderNull::CreateHeadless(CreateContextFlags)
|
||||
GLContextProviderNull::CreateHeadless(bool)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -607,7 +607,7 @@ CreateWindowOffscreenContext()
|
|||
}
|
||||
|
||||
already_AddRefed<GLContext>
|
||||
GLContextProviderWGL::CreateHeadless(CreateContextFlags)
|
||||
GLContextProviderWGL::CreateHeadless(bool requireCompatProfile, bool forceEnabled)
|
||||
{
|
||||
if (!sWGLLib.EnsureInitialized()) {
|
||||
return nullptr;
|
||||
|
@ -642,9 +642,9 @@ GLContextProviderWGL::CreateHeadless(CreateContextFlags)
|
|||
already_AddRefed<GLContext>
|
||||
GLContextProviderWGL::CreateOffscreen(const IntSize& size,
|
||||
const SurfaceCaps& caps,
|
||||
CreateContextFlags flags)
|
||||
bool requireCompatProfile)
|
||||
{
|
||||
nsRefPtr<GLContext> glContext = CreateHeadless(flags);
|
||||
nsRefPtr<GLContext> glContext = CreateHeadless(requireCompatProfile);
|
||||
if (!glContext)
|
||||
return nullptr;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ GLImage::GetAsSourceSurface()
|
|||
MOZ_ASSERT(NS_IsMainThread(), "Should be on the main thread");
|
||||
|
||||
if (!sSnapshotContext) {
|
||||
sSnapshotContext = GLContextProvider::CreateHeadless(CreateContextFlags::NONE);
|
||||
sSnapshotContext = GLContextProvider::CreateHeadless(false);
|
||||
if (!sSnapshotContext) {
|
||||
NS_WARNING("Failed to create snapshot GLContext");
|
||||
return nullptr;
|
||||
|
|
|
@ -126,8 +126,9 @@ CompositorOGL::CreateContext()
|
|||
caps.preserve = false;
|
||||
caps.bpp16 = gfxPlatform::GetPlatform()->GetOffscreenFormat() == gfxImageFormat::RGB16_565;
|
||||
|
||||
bool requireCompatProfile = true;
|
||||
context = GLContextProvider::CreateOffscreen(mSurfaceSize,
|
||||
caps, CreateContextFlags::REQUIRE_COMPAT_PROFILE);
|
||||
caps, requireCompatProfile);
|
||||
}
|
||||
|
||||
if (!context) {
|
||||
|
|
|
@ -45,8 +45,7 @@ public:
|
|||
caps.preserve = false;
|
||||
caps.bpp16 = false;
|
||||
nsRefPtr<GLContext> context = GLContextProvider::CreateOffscreen(
|
||||
IntSize(gCompWidth, gCompHeight), caps,
|
||||
CreateContextFlags::REQUIRE_COMPAT_PROFILE);
|
||||
IntSize(gCompWidth, gCompHeight), caps, true);
|
||||
return context.forget().take();
|
||||
}
|
||||
return nullptr;
|
||||
|
|
|
@ -25,7 +25,7 @@ TEST(GfxPrefs, LiveValues) {
|
|||
ASSERT_TRUE(gfxPrefs::SingletonExists());
|
||||
|
||||
// Live boolean, default false
|
||||
ASSERT_FALSE(gfxPrefs::LayersDumpTexture());
|
||||
ASSERT_FALSE(gfxPrefs::CanvasAzureAccelerated());
|
||||
|
||||
// Live int32_t, default 23456
|
||||
ASSERT_TRUE(gfxPrefs::LayerScopePort() == 23456);
|
||||
|
@ -66,11 +66,11 @@ TEST(GfxPrefs, Set) {
|
|||
ASSERT_FALSE(gfxPrefs::LayersDump());
|
||||
|
||||
// Live boolean, default false
|
||||
ASSERT_FALSE(gfxPrefs::LayersDumpTexture());
|
||||
gfxPrefs::SetLayersDumpTexture(true);
|
||||
ASSERT_TRUE(gfxPrefs::LayersDumpTexture());
|
||||
gfxPrefs::SetLayersDumpTexture(false);
|
||||
ASSERT_FALSE(gfxPrefs::LayersDumpTexture());
|
||||
ASSERT_FALSE(gfxPrefs::CanvasAzureAccelerated());
|
||||
gfxPrefs::SetCanvasAzureAccelerated(true);
|
||||
ASSERT_TRUE(gfxPrefs::CanvasAzureAccelerated());
|
||||
gfxPrefs::SetCanvasAzureAccelerated(false);
|
||||
ASSERT_FALSE(gfxPrefs::CanvasAzureAccelerated());
|
||||
|
||||
// Once float, default -1
|
||||
ASSERT_TRUE(gfxPrefs::APZMaxVelocity() == -1.0f);
|
||||
|
|
|
@ -122,7 +122,6 @@ void ShutdownTileCache();
|
|||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::layers;
|
||||
using namespace mozilla::gl;
|
||||
|
||||
gfxPlatform *gPlatform = nullptr;
|
||||
static bool gEverInitialized = false;
|
||||
|
@ -495,7 +494,7 @@ gfxPlatform::Init()
|
|||
#endif
|
||||
|
||||
#ifdef MOZ_GL_DEBUG
|
||||
GLContext::StaticInit();
|
||||
mozilla::gl::GLContext::StaticInit();
|
||||
#endif
|
||||
|
||||
InitLayersAccelerationPrefs();
|
||||
|
@ -543,11 +542,11 @@ gfxPlatform::Init()
|
|||
gPlatform->mFontPrefsObserver = new FontPrefsObserver();
|
||||
Preferences::AddStrongObservers(gPlatform->mFontPrefsObserver, kObservedPrefs);
|
||||
|
||||
GLContext::PlatformStartup();
|
||||
mozilla::gl::GLContext::PlatformStartup();
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
// Texture pool init
|
||||
TexturePoolOGL::Init();
|
||||
mozilla::gl::TexturePoolOGL::Init();
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_GONK
|
||||
|
@ -627,11 +626,11 @@ gfxPlatform::Shutdown()
|
|||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
// Shut down the texture pool
|
||||
TexturePoolOGL::Shutdown();
|
||||
mozilla::gl::TexturePoolOGL::Shutdown();
|
||||
#endif
|
||||
|
||||
// Shut down the default GL context provider.
|
||||
GLContextProvider::Shutdown();
|
||||
mozilla::gl::GLContextProvider::Shutdown();
|
||||
|
||||
#if defined(XP_WIN)
|
||||
// The above shutdown calls operate on the available context providers on
|
||||
|
@ -640,7 +639,7 @@ gfxPlatform::Shutdown()
|
|||
// We should only support the default GL provider on Windows; then, this
|
||||
// could go away. Unfortunately, we currently support WGL (the default) for
|
||||
// WebGL on Optimus.
|
||||
GLContextProviderEGL::Shutdown();
|
||||
mozilla::gl::GLContextProviderEGL::Shutdown();
|
||||
#endif
|
||||
|
||||
// This is a bit iffy - we're assuming that we were the ones that set the
|
||||
|
@ -1079,7 +1078,7 @@ gfxPlatform::InitializeSkiaCacheLimits()
|
|||
}
|
||||
}
|
||||
|
||||
SkiaGLGlue*
|
||||
mozilla::gl::SkiaGLGlue*
|
||||
gfxPlatform::GetSkiaGLGlue()
|
||||
{
|
||||
#ifdef USE_SKIA_GPU
|
||||
|
@ -1089,14 +1088,14 @@ gfxPlatform::GetSkiaGLGlue()
|
|||
* FIXME: This should be stored in TLS or something, since there needs to be one for each thread using it. As it
|
||||
* stands, this only works on the main thread.
|
||||
*/
|
||||
nsRefPtr<GLContext> glContext;
|
||||
glContext = GLContextProvider::CreateHeadless(CreateContextFlags::REQUIRE_COMPAT_PROFILE |
|
||||
CreateContextFlags::ALLOW_OFFLINE_RENDERER);
|
||||
bool requireCompatProfile = true;
|
||||
nsRefPtr<mozilla::gl::GLContext> glContext;
|
||||
glContext = mozilla::gl::GLContextProvider::CreateHeadless(requireCompatProfile);
|
||||
if (!glContext) {
|
||||
printf_stderr("Failed to create GLContext for SkiaGL!\n");
|
||||
return nullptr;
|
||||
}
|
||||
mSkiaGlue = new SkiaGLGlue(glContext);
|
||||
mSkiaGlue = new mozilla::gl::SkiaGLGlue(glContext);
|
||||
MOZ_ASSERT(mSkiaGlue->GetGrContext(), "No GrContext");
|
||||
InitializeSkiaCacheLimits();
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
fuzzy-if(!contentSameGfxBackendAsCanvas,4,88500) fuzzy-if(azureSkiaGL,4,89700) fuzzy-if(azureQuartz,1,34792) == linear-1a.html linear-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,4,88500) fuzzy-if(azureSkiaGL,4,89700) fuzzy-if(azureQuartz,1,34792) == linear-1b.html linear-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,4,88500) fuzzy-if(azureSkiaGL,3,89700) fuzzy-if(azureQuartz,1,34792) == linear-1a.html linear-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,4,88500) fuzzy-if(azureSkiaGL,3,89700) fuzzy-if(azureQuartz,1,34792) == linear-1b.html linear-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,2,88500) fuzzy-if(azureSkiaGL,2,89997) fuzzy-if(azureQuartz,1,11469) == linear-keywords-1a.html linear-keywords-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,2,88500) fuzzy-if(azureSkiaGL,2,89997) fuzzy-if(azureQuartz,1,11985) == linear-keywords-1b.html linear-keywords-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,2,88500) fuzzy-if(azureQuartz,1,10230) == linear-percent.html linear-percent-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,4,92400) fuzzy-if(azureSkiaGL,3,143400) fuzzy-if(azureQuartz,1,27827) fuzzy-if(Android&&AndroidVersion>=15,4,93000) == linear-mix.html linear-mix-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,4,92400) fuzzy-if(azureSkiaGL,2,143400) fuzzy-if(azureQuartz,1,27827) fuzzy-if(Android&&AndroidVersion>=15,4,93000) == linear-mix.html linear-mix-ref.html
|
||||
== linear-diagonal-1a.html linear-diagonal-1-ref.html
|
||||
== linear-diagonal-1b.html linear-diagonal-1-ref.html
|
||||
== linear-diagonal-1c.html linear-diagonal-1-ref.html
|
||||
|
@ -45,11 +45,11 @@ fails-if(d2d) == linear-repeat-1g.html linear-repeat-1-ref.html # bug 582236
|
|||
== linear-stops-1d.html linear-stops-1-ref.html
|
||||
== linear-stops-1e.html linear-stops-1-ref.html
|
||||
== linear-stops-1f.html linear-stops-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,3,89700) fuzzy-if(azureQuartz,1,22367) == linear-vertical-1a.html linear-vertical-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,3,89700) fuzzy-if(azureQuartz,1,22367) == linear-vertical-1b.html linear-vertical-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,3,89700) fuzzy-if(azureQuartz,2,26777) == linear-vertical-1c.html linear-vertical-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,3,89700) fuzzy-if(azureQuartz,2,26777) == linear-vertical-1d.html linear-vertical-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,3,89700) fuzzy-if(azureQuartz,1,22367) == linear-vertical-1e.html linear-vertical-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,2,89700) fuzzy-if(azureQuartz,1,22367) == linear-vertical-1a.html linear-vertical-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,2,89700) fuzzy-if(azureQuartz,1,22367) == linear-vertical-1b.html linear-vertical-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,2,89700) fuzzy-if(azureQuartz,2,26777) == linear-vertical-1c.html linear-vertical-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,2,89700) fuzzy-if(azureQuartz,2,26777) == linear-vertical-1d.html linear-vertical-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,3,88500) fuzzy-if(azureSkiaGL,2,89700) fuzzy-if(azureQuartz,1,22367) == linear-vertical-1e.html linear-vertical-1-ref.html
|
||||
== linear-vertical-subpixel-1.html linear-vertical-subpixel-1-ref.html
|
||||
== linear-viewport.html linear-viewport-ref.html
|
||||
fails-if(OSX==1010) fuzzy-if(Android,4,248) == linear-zero-length-1a.html linear-zero-length-1-ref.html
|
||||
|
@ -57,15 +57,15 @@ fails-if(OSX==1010) fuzzy-if(Android,4,248) == linear-zero-length-1b.html linear
|
|||
fails-if(OSX==1010) fuzzy-if(Android,4,248) == linear-zero-length-1c.html linear-zero-length-1-ref.html
|
||||
== nostops.html about:blank
|
||||
== onestop.html about:blank
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fuzzy-if(cocoaWidget,9,87824) fuzzy-if(azureSkiaGL,6,88024) random-if(d2d) == radial-1a.html radial-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fuzzy-if(cocoaWidget,9,87824) fuzzy-if(azureSkiaGL,6,88024) random-if(d2d) == radial-1b.html radial-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fuzzy-if(cocoaWidget,9,87824) fuzzy-if(azureSkiaGL,6,88024) random-if(d2d) == radial-1c.html radial-1-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,4,90000) == radial-2a.html radial-2-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,4,90000) == radial-2b.html radial-2-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,4,90000) == radial-2c.html radial-2-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,4,90000) == radial-2d.html radial-2-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,4,90000) == radial-2e.html radial-2-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,4,90000) == radial-2f.html radial-2-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fuzzy-if(cocoaWidget,9,87824) fuzzy-if(azureSkiaGL,2,88024) random-if(d2d) == radial-1a.html radial-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fuzzy-if(cocoaWidget,9,87824) fuzzy-if(azureSkiaGL,2,88024) random-if(d2d) == radial-1b.html radial-1-ref.html
|
||||
fuzzy-if(!contentSameGfxBackendAsCanvas,1,5884) fuzzy-if(cocoaWidget,9,87824) fuzzy-if(azureSkiaGL,2,88024) random-if(d2d) == radial-1c.html radial-1-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,2,90000) == radial-2a.html radial-2-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,2,90000) == radial-2b.html radial-2-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,2,90000) == radial-2c.html radial-2-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,2,90000) == radial-2d.html radial-2-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,2,90000) == radial-2e.html radial-2-ref.html
|
||||
fuzzy(3,7860) fuzzy-if(cocoaWidget,5,89041) fuzzy-if(azureSkiaGL,2,90000) == radial-2f.html radial-2-ref.html
|
||||
== radial-position-1a.html radial-position-1-ref.html
|
||||
fuzzy-if(cocoaWidget,1,28) fuzzy-if(winWidget,1,18) == radial-position-1b.html radial-position-1-ref.html
|
||||
fuzzy-if(cocoaWidget,4,22317) fuzzy-if(Android,8,771) == radial-shape-closest-corner-1a.html radial-shape-closest-corner-1-ref.html
|
||||
|
|
|
@ -75,7 +75,8 @@ public:
|
|||
}
|
||||
|
||||
nsRefPtr<gl::GLContext> gl;
|
||||
gl = gl::GLContextProvider::CreateHeadless(gl::CreateContextFlags::REQUIRE_COMPAT_PROFILE);
|
||||
bool requireCompatProfile = true;
|
||||
gl = gl::GLContextProvider::CreateHeadless(requireCompatProfile);
|
||||
|
||||
if (!gl) {
|
||||
// Setting mReady to true here means that we won't retry. Everything will
|
||||
|
|
Загрузка…
Ссылка в новой задаче