Skip to content

Commit

Permalink
Backed out changeset 5105ca2d1171 (bug 1868825) for causing bp-nu bus…
Browse files Browse the repository at this point in the history
…tages in GLLibraryEGL.h. CLOSED TREE
  • Loading branch information
Stanca Serban committed Dec 13, 2023
1 parent 034a395 commit 7639e8a
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions gfx/gl/GLLibraryEGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

#ifdef MOZ_WIDGET_ANDROID
# include "mozilla/ProfilerLabels.h"
# include "AndroidBuild.h"
#endif

#if defined(MOZ_X11)
Expand Down Expand Up @@ -691,21 +690,6 @@ class GLLibraryEGL final {
} mSymbols = {};
};

static bool ShouldLeakEglDisplay() {
// We are seeing crashes in eglTerminate on the Samsung S22 family of devices
// running Android 14, so we leak the EGLDisplay rather than call
// eglTerminate.
#ifdef MOZ_WIDGET_ANDROID
if (jni::GetAPIVersion() >= 34) {
const auto board = java::sdk::Build::BOARD()->ToString();
if (board.EqualsASCII("s5e9925")) {
return true;
}
}
#endif
return false;
}

class EglDisplay final {
public:
const RefPtr<GLLibraryEGL> mLib;
Expand Down Expand Up @@ -755,13 +739,7 @@ class EglDisplay final {

// -

EGLBoolean fTerminate() {
static const bool shouldLeak = ShouldLeakEglDisplay();
if (shouldLeak) {
return LOCAL_EGL_TRUE;
}
return mLib->fTerminate(mDisplay);
}
EGLBoolean fTerminate() { return mLib->fTerminate(mDisplay); }

EGLBoolean fMakeCurrent(EGLSurface draw, EGLSurface read,
EGLContext ctx) const {
Expand Down

0 comments on commit 7639e8a

Please sign in to comment.