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.

45 lines
1.8 KiB

  1. Original commit: https://github.com/anbox/anbox/pull/1875/commits/a38b10b6bd519faa781d43d45f9740e5e82c4ca6
  2. From a38b10b6bd519faa781d43d45f9740e5e82c4ca6 Mon Sep 17 00:00:00 2001
  3. From: kuailexs <952415538@qq.com>
  4. Date: Wed, 28 Jul 2021 20:54:32 +0800
  5. Subject: [PATCH] emugl:fix webview,GL_SHADING_LANGUAGE_VERSION and
  6. EGL_RENDERABLE_TYPE
  7. ---
  8. src/anbox/graphics/emugl/RenderControl.cpp | 3 +++
  9. src/anbox/graphics/emugl/RendererConfig.cpp | 7 +++++++
  10. 2 files changed, 10 insertions(+)
  11. diff --git a/src/anbox/graphics/emugl/RenderControl.cpp b/src/anbox/graphics/emugl/RenderControl.cpp
  12. index 9f2558553..99f30015d 100644
  13. --- a/src/anbox/graphics/emugl/RenderControl.cpp
  14. +++ b/src/anbox/graphics/emugl/RenderControl.cpp
  15. @@ -144,6 +144,9 @@ static EGLint rcGetGLString(EGLenum name, void* buffer, EGLint bufferSize) {
  16. };
  17. result = filter_extensions(result, whitelisted_extensions);
  18. + }else if (name == GL_SHADING_LANGUAGE_VERSION) {
  19. + // GL_VERSION:"OpenGL ES 2.0" matched GL_SHADING_LANGUAGE_VERSION:"OpenGL ES GLSL ES 1.00"
  20. + result = "OpenGL ES GLSL ES 1.00";
  21. }
  22. int nextBufferSize = result.size() + 1;
  23. diff --git a/src/anbox/graphics/emugl/RendererConfig.cpp b/src/anbox/graphics/emugl/RendererConfig.cpp
  24. index 02b6b7882..f7027dc9d 100644
  25. --- a/src/anbox/graphics/emugl/RendererConfig.cpp
  26. +++ b/src/anbox/graphics/emugl/RendererConfig.cpp
  27. @@ -142,6 +142,13 @@ int RendererConfigList::chooseConfig(const EGLint* attribs, EGLint* configs,
  28. mustReplaceSurfaceType = true;
  29. }
  30. }
  31. + // EGL_RENDERABLE_TYPE , fix webview
  32. + if (attribs[numAttribs] == EGL_RENDERABLE_TYPE) {
  33. + if (attribs[numAttribs + 1] > EGL_OPENGL_ES2_BIT) {
  34. + ERROR("EGL_RENDERABLE_TYPE can not > EGL_OPENGL_ES2_BIT");
  35. + return 0;
  36. + }
  37. + }
  38. numAttribs += 2;
  39. }