forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-11-20 5a4414d1fd83d52b073fc27f6e12dc9fe3b32766
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From fdc9866e48797f22762da457688b6ca93b6a337e Mon Sep 17 00:00:00 2001
From: Takuro Ashie <ashie@homa.ne.jp>
Date: Wed, 8 May 2019 14:42:24 +0900
Subject: [PATCH] Disable eglQueryString(nullptr, EGL_EXTENSIONS)
 
Because it causes crash on certain environments such as PowerVR drivers,
and such extensions aren't used on Linux in fact.
 
Upstream-Status: Inappropriate [OE-specific: https://bugzilla.mozilla.org/show_bug.cgi?id=1571603]
 
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Signed-off-by: Takuro Ashie <ashie@clear-code.com>
 
---
 gfx/gl/GLContextProviderEGL.cpp | 6 ++++++
 gfx/gl/GLLibraryEGL.cpp         | 2 ++
 2 files changed, 8 insertions(+)
 
diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp
index 0ee98f3fce..ac6f29a2eb 100644
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -525,10 +525,16 @@ void GLContextEGL::GetWSIInfo(nsCString* const out) const {
   out->Append(
       (const char*)mEgl->fQueryString(EGL_DISPLAY(), LOCAL_EGL_EXTENSIONS));
 
+#if 0
 #ifndef ANDROID  // This query will crash some old android.
+  // Bug 1209612: Crashes on a number of android drivers.
+  // Ideally we would only blocklist this there, but for now we don't need the
+  // client extension list on ANDROID or embedded linux (we mostly need it on
+  // ANGLE), and we'd rather not crash.
   out->AppendLiteral("\nEGL_EXTENSIONS(nullptr): ");
   out->Append((const char*)mEgl->fQueryString(nullptr, LOCAL_EGL_EXTENSIONS));
 #endif
+#endif
 }
 
 // hold a reference to the given surface
diff --git a/gfx/gl/GLLibraryEGL.cpp b/gfx/gl/GLLibraryEGL.cpp
index 812a66c79e..679b5426e9 100644
--- a/gfx/gl/GLLibraryEGL.cpp
+++ b/gfx/gl/GLLibraryEGL.cpp
@@ -834,12 +834,14 @@ void GLLibraryEGL::InitClientExtensions() {
 
   const char* rawExtString = nullptr;
 
+#if 0
 #ifndef ANDROID
   // Bug 1209612: Crashes on a number of android drivers.
   // Ideally we would only blocklist this there, but for now we don't need the
   // client extension list on ANDROID (we mostly need it on ANGLE), and we'd
   // rather not crash.
   rawExtString = (const char*)fQueryString(nullptr, LOCAL_EGL_EXTENSIONS);
+#endif
 #endif
 
   if (!rawExtString) {