summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-05-12 14:32:03 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-05-12 14:32:03 +0200
commitb7d9dad58e5a3f87a6c767412941700bc8010044 (patch)
treef5e99b3029cf54409ae5951e9e91cca3a54addc7 /gfx
parent73cdd6117df7c17b76aad93952cf574c494351aa (diff)
downloadUXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar.gz
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar.lz
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.tar.xz
UXP-b7d9dad58e5a3f87a6c767412941700bc8010044.zip
Remove MOZ_B2G leftovers and some dead B2G-only components.
Diffstat (limited to 'gfx')
-rw-r--r--gfx/gl/GLLibraryEGL.cpp8
-rw-r--r--gfx/gl/GLLibraryEGL.h20
-rw-r--r--gfx/layers/Compositor.cpp4
-rw-r--r--gfx/layers/ipc/LayerTransactionChild.cpp9
-rw-r--r--gfx/thebes/gfxPlatform.cpp9
5 files changed, 5 insertions, 45 deletions
diff --git a/gfx/gl/GLLibraryEGL.cpp b/gfx/gl/GLLibraryEGL.cpp
index 130bce119..22be44ed6 100644
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -33,9 +33,6 @@ namespace gl {
StaticMutex GLLibraryEGL::sMutex;
GLLibraryEGL sEGLLibrary;
-#ifdef MOZ_B2G
-MOZ_THREAD_LOCAL(EGLContext) GLLibraryEGL::sCurrentContext;
-#endif
// should match the order of EGLExtensions, and be null-terminated.
static const char* sEGLExtensionNames[] = {
@@ -305,11 +302,6 @@ GLLibraryEGL::EnsureInitialized(bool forceAccel, nsACString* const out_failureId
mozilla::ScopedGfxFeatureReporter reporter("EGL");
-#ifdef MOZ_B2G
- if (!sCurrentContext.init())
- MOZ_CRASH("GFX: Tls init failed");
-#endif
-
#ifdef XP_WIN
if (!mEGLLibrary) {
// On Windows, the GLESv2, EGL and DXSDK libraries are shipped with libxul and
diff --git a/gfx/gl/GLLibraryEGL.h b/gfx/gl/GLLibraryEGL.h
index fa6ea748b..88fce067e 100644
--- a/gfx/gl/GLLibraryEGL.h
+++ b/gfx/gl/GLLibraryEGL.h
@@ -656,32 +656,12 @@ public:
static void AfterGLCall(const char* glFunction);
#endif
-#ifdef MOZ_B2G
- EGLContext CachedCurrentContext() {
- return sCurrentContext.get();
- }
- void UnsetCachedCurrentContext() {
- sCurrentContext.set(nullptr);
- }
- void SetCachedCurrentContext(EGLContext aCtx) {
- sCurrentContext.set(aCtx);
- }
- bool CachedCurrentContextMatches() {
- return sCurrentContext.get() == fGetCurrentContext();
- }
-
-private:
- static MOZ_THREAD_LOCAL(EGLContext) sCurrentContext;
-public:
-
-#else
EGLContext CachedCurrentContext() {
return nullptr;
}
void UnsetCachedCurrentContext() {}
void SetCachedCurrentContext(EGLContext aCtx) { }
bool CachedCurrentContextMatches() { return true; }
-#endif
private:
bool mInitialized;
diff --git a/gfx/layers/Compositor.cpp b/gfx/layers/Compositor.cpp
index ce7eb9008..b623b8de9 100644
--- a/gfx/layers/Compositor.cpp
+++ b/gfx/layers/Compositor.cpp
@@ -173,9 +173,7 @@ Compositor::DrawDiagnosticsInternal(DiagnosticFlags aFlags,
const gfx::Matrix4x4& aTransform,
uint32_t aFlashCounter)
{
-#ifdef MOZ_B2G
- int lWidth = 4;
-#elif defined(ANDROID)
+#if defined(ANDROID)
int lWidth = 10;
#else
int lWidth = 2;
diff --git a/gfx/layers/ipc/LayerTransactionChild.cpp b/gfx/layers/ipc/LayerTransactionChild.cpp
index 8b60d3b51..f07e2c27f 100644
--- a/gfx/layers/ipc/LayerTransactionChild.cpp
+++ b/gfx/layers/ipc/LayerTransactionChild.cpp
@@ -72,15 +72,6 @@ void
LayerTransactionChild::ActorDestroy(ActorDestroyReason why)
{
mDestroyed = true;
-#ifdef MOZ_B2G
- // Due to poor lifetime management of gralloc (and possibly shmems) we will
- // crash at some point in the future when we get destroyed due to abnormal
- // shutdown. Its better just to crash here. On desktop though, we have a chance
- // of recovering.
- if (why == AbnormalShutdown) {
- NS_RUNTIMEABORT("ActorDestroy by IPC channel failure at LayerTransactionChild");
- }
-#endif
}
} // namespace layers
diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp
index a468592fe..4db7bc29f 100644
--- a/gfx/thebes/gfxPlatform.cpp
+++ b/gfx/thebes/gfxPlatform.cpp
@@ -2399,11 +2399,10 @@ gfxPlatform::GetTilesSupportInfo(mozilla::widget::InfoObject& aObj)
/*static*/ bool
gfxPlatform::AsyncPanZoomEnabled()
{
-#if !defined(MOZ_B2G) && !defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_UIKIT)
- // For XUL applications (everything but B2G on mobile and desktop, and
- // Firefox on Android) we only want to use APZ when E10S is enabled. If
- // we ever get input events off the main thread we can consider relaxing
- // this requirement.
+#if !defined(MOZ_WIDGET_ANDROID) && !defined(MOZ_WIDGET_UIKIT)
+ // For XUL applications (everything but Firefox on Android) we only want
+ // to use APZ when E10S is enabled. If we ever get input events off the
+ // main thread we can consider relaxing this requirement.
if (!BrowserTabsRemoteAutostart()) {
return false;
}