Custom Anbox installation files & patches, including patched Android OS image file.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.7 KiB

  1. Source: https://github.com/anbox/anbox/pull/1877/commits/3e71a84065ca09c605f36ecf2825debf161c1be6
  2. From 3e71a84065ca09c605f36ecf2825debf161c1be6 Mon Sep 17 00:00:00 2001
  3. From: kuailexs <952415538@qq.com>
  4. Date: Fri, 30 Jul 2021 23:54:11 +0800
  5. Subject: [PATCH] fix webview,GL_SHADING_LANGUAGE_VERSION and
  6. EGL_RENDERABLE_TYPE
  7. ---
  8. android/opengl/system/egl/egl.cpp | 4 ++++
  9. src/anbox/graphics/emugl/RenderControl.cpp | 3 +++
  10. 2 files changed, 7 insertions(+)
  11. diff --git a/android/opengl/system/egl/egl.cpp b/android/opengl/system/egl/egl.cpp
  12. index ae5a8892c..981830243 100644
  13. --- a/android/opengl/system/egl/egl.cpp
  14. +++ b/android/opengl/system/egl/egl.cpp
  15. @@ -606,6 +606,10 @@ EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute
  16. if (s_display.getConfigAttrib(config, attribute, value))
  17. {
  18. + if (attribute == EGL_RENDERABLE_TYPE && *value > EGL_OPENGL_ES2_BIT){
  19. + ALOGE("[%s] EGL_RENDERABLE_TYPE -> EGL_OPENGL_ES2_BIT\n", __FUNCTION__);
  20. + *value = EGL_OPENGL_ES2_BIT;
  21. + }
  22. return EGL_TRUE;
  23. }
  24. else
  25. diff --git a/src/anbox/graphics/emugl/RenderControl.cpp b/src/anbox/graphics/emugl/RenderControl.cpp
  26. index 9f2558553..99f30015d 100644
  27. --- a/src/anbox/graphics/emugl/RenderControl.cpp
  28. +++ b/src/anbox/graphics/emugl/RenderControl.cpp
  29. @@ -144,6 +144,9 @@ static EGLint rcGetGLString(EGLenum name, void* buffer, EGLint bufferSize) {
  30. };
  31. result = filter_extensions(result, whitelisted_extensions);
  32. + }else if (name == GL_SHADING_LANGUAGE_VERSION) {
  33. + // GL_VERSION:"OpenGL ES 2.0" matched GL_SHADING_LANGUAGE_VERSION:"OpenGL ES GLSL ES 1.00"
  34. + result = "OpenGL ES GLSL ES 1.00";
  35. }
  36. int nextBufferSize = result.size() + 1;