|
|
@ -1,16 +1,30 @@ |
|
|
|
Original commit: https://github.com/anbox/anbox/pull/1875/commits/a38b10b6bd519faa781d43d45f9740e5e82c4ca6 |
|
|
|
|
|
|
|
From a38b10b6bd519faa781d43d45f9740e5e82c4ca6 Mon Sep 17 00:00:00 2001 |
|
|
|
Source: https://github.com/anbox/anbox/pull/1877/commits/3e71a84065ca09c605f36ecf2825debf161c1be6 |
|
|
|
From 3e71a84065ca09c605f36ecf2825debf161c1be6 Mon Sep 17 00:00:00 2001 |
|
|
|
From: kuailexs <952415538@qq.com> |
|
|
|
Date: Wed, 28 Jul 2021 20:54:32 +0800 |
|
|
|
Subject: [PATCH] emugl:fix webview,GL_SHADING_LANGUAGE_VERSION and |
|
|
|
Date: Fri, 30 Jul 2021 23:54:11 +0800 |
|
|
|
Subject: [PATCH] fix webview,GL_SHADING_LANGUAGE_VERSION and |
|
|
|
EGL_RENDERABLE_TYPE |
|
|
|
|
|
|
|
---
|
|
|
|
src/anbox/graphics/emugl/RenderControl.cpp | 3 +++ |
|
|
|
src/anbox/graphics/emugl/RendererConfig.cpp | 7 +++++++ |
|
|
|
2 files changed, 10 insertions(+) |
|
|
|
android/opengl/system/egl/egl.cpp | 4 ++++ |
|
|
|
src/anbox/graphics/emugl/RenderControl.cpp | 3 +++ |
|
|
|
2 files changed, 7 insertions(+) |
|
|
|
|
|
|
|
diff --git a/android/opengl/system/egl/egl.cpp b/android/opengl/system/egl/egl.cpp
|
|
|
|
index ae5a8892c..981830243 100644
|
|
|
|
--- a/android/opengl/system/egl/egl.cpp
|
|
|
|
+++ b/android/opengl/system/egl/egl.cpp
|
|
|
|
@@ -606,6 +606,10 @@ EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute
|
|
|
|
|
|
|
|
if (s_display.getConfigAttrib(config, attribute, value)) |
|
|
|
{ |
|
|
|
+ if (attribute == EGL_RENDERABLE_TYPE && *value > EGL_OPENGL_ES2_BIT){
|
|
|
|
+ ALOGE("[%s] EGL_RENDERABLE_TYPE -> EGL_OPENGL_ES2_BIT\n", __FUNCTION__);
|
|
|
|
+ *value = EGL_OPENGL_ES2_BIT;
|
|
|
|
+ }
|
|
|
|
return EGL_TRUE; |
|
|
|
} |
|
|
|
else |
|
|
|
diff --git a/src/anbox/graphics/emugl/RenderControl.cpp b/src/anbox/graphics/emugl/RenderControl.cpp
|
|
|
|
index 9f2558553..99f30015d 100644
|
|
|
|
--- a/src/anbox/graphics/emugl/RenderControl.cpp
|
|
|
@ -25,21 +39,3 @@ index 9f2558553..99f30015d 100644 |
|
|
|
} |
|
|
|
|
|
|
|
int nextBufferSize = result.size() + 1; |
|
|
|
diff --git a/src/anbox/graphics/emugl/RendererConfig.cpp b/src/anbox/graphics/emugl/RendererConfig.cpp
|
|
|
|
index 02b6b7882..f7027dc9d 100644
|
|
|
|
--- a/src/anbox/graphics/emugl/RendererConfig.cpp
|
|
|
|
+++ b/src/anbox/graphics/emugl/RendererConfig.cpp
|
|
|
|
@@ -142,6 +142,13 @@ int RendererConfigList::chooseConfig(const EGLint* attribs, EGLint* configs,
|
|
|
|
mustReplaceSurfaceType = true; |
|
|
|
} |
|
|
|
} |
|
|
|
+ // EGL_RENDERABLE_TYPE , fix webview
|
|
|
|
+ if (attribs[numAttribs] == EGL_RENDERABLE_TYPE) {
|
|
|
|
+ if (attribs[numAttribs + 1] > EGL_OPENGL_ES2_BIT) {
|
|
|
|
+ ERROR("EGL_RENDERABLE_TYPE can not > EGL_OPENGL_ES2_BIT");
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
numAttribs += 2; |
|
|
|
} |
|
|
|
|