mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 17:24:29 +00:00
Bug 1195401 - Use gfxPrefs (threadsafe) rather than crashing on debug builds for off-main-thread pref access. r=snorp
--HG-- extra : commitid : 5uavw49AOAg
This commit is contained in:
parent
da63c9c4df
commit
c10cfda0d4
@ -11,13 +11,13 @@
|
||||
#include <android/log.h>
|
||||
#include "AndroidSurfaceTexture.h"
|
||||
#include "gfxImageSurface.h"
|
||||
#include "gfxPrefs.h"
|
||||
#include "AndroidBridge.h"
|
||||
#include "nsThreadUtils.h"
|
||||
#include "mozilla/gfx/Matrix.h"
|
||||
#include "GeneratedJNIWrappers.h"
|
||||
#include "SurfaceTexture.h"
|
||||
#include "GLContext.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::jni;
|
||||
@ -132,7 +132,7 @@ AndroidSurfaceTexture::UpdateCanDetach()
|
||||
// The API for attach/detach only exists on 16+, and PowerVR has some sort of
|
||||
// fencing issue. Additionally, attach/detach seems to be busted on at least some
|
||||
// Mali adapters (400MP2 for sure, bug 1131793)
|
||||
bool canDetach = Preferences::GetBool("gfx.SurfaceTexture.detach.enabled", true);
|
||||
bool canDetach = gfxPrefs::SurfaceTextureDetachEnabled();
|
||||
|
||||
mCanDetach = AndroidBridge::Bridge()->GetAPIVersion() >= 16 &&
|
||||
(!mAttachedContext || mAttachedContext->Vendor() != GLVendor::Imagination) &&
|
||||
|
@ -240,6 +240,7 @@ private:
|
||||
// Note that "gfx.logging.level" is defined in Logging.h
|
||||
DECL_GFX_PREF(Once, "gfx.logging.crash.length", GfxLoggingCrashLength, uint32_t, 6);
|
||||
DECL_GFX_PREF(Live, "gfx.perf-warnings.enabled", PerfWarnings, bool, false);
|
||||
DECL_GFX_PREF(Live, "gfx.SurfaceTexture.detach.enabled", SurfaceTextureDetachEnabled, bool, true);
|
||||
DECL_GFX_PREF(Live, "gfx.testing.device-reset", DeviceResetForTesting, int32_t, 0);
|
||||
DECL_GFX_PREF(Live, "gfx.testing.device-fail", DeviceFailForTesting, bool, false);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user