Browse Source

Update webview patch

master
Pekka Helenius 2 years ago
parent
commit
5add4d0929
3 changed files with 66 additions and 27 deletions
  1. +3
    -1
      anbox_files/PKGBUILD
  2. +41
    -0
      anbox_files/patch_fix-webview.patch
  3. +22
    -26
      androidOS_files/patch_fix-webview.patch

+ 3
- 1
anbox_files/PKGBUILD View File

@ -22,6 +22,7 @@ patches=(
'patch_remove-unknown-opt.patch'
'patch_window-restored.patch'
'patch_window-icons.patch'
'patch_fix-webview.patch'
)
source=("git+https://github.com/anbox/anbox.git"
@ -63,7 +64,8 @@ sha256sums=('SKIP'
'bf751d44500c3689a3fd56c757d59632441bee78d1857bef84319f38da1a33ba'
'b96eedc64972c671a57052c53760b60aac00e95c80a7020818582957d247558f'
'926e13e113baf307cc1556e11e0b621e5fae455f9a02eb3cc0a75c6584dd27a2'
'ccea9d574da7861a9a1978e6dec2f8d47ef751acde874fd75f041076ae8cce58')
'ccea9d574da7861a9a1978e6dec2f8d47ef751acde874fd75f041076ae8cce58'
'03f81f644003689038dce53b8006c46d02a25056c1e3380d883680f0a9b5a500')
pkgver() {
cd "$srcdir/$_pkgname"


+ 41
- 0
anbox_files/patch_fix-webview.patch View File

@ -0,0 +1,41 @@
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: Fri, 30 Jul 2021 23:54:11 +0800
Subject: [PATCH] fix webview,GL_SHADING_LANGUAGE_VERSION and
EGL_RENDERABLE_TYPE
---
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
+++ b/src/anbox/graphics/emugl/RenderControl.cpp
@@ -144,6 +144,9 @@ static EGLint rcGetGLString(EGLenum name, void* buffer, EGLint bufferSize) {
};
result = filter_extensions(result, whitelisted_extensions);
+ }else if (name == GL_SHADING_LANGUAGE_VERSION) {
+ // GL_VERSION:"OpenGL ES 2.0" matched GL_SHADING_LANGUAGE_VERSION:"OpenGL ES GLSL ES 1.00"
+ result = "OpenGL ES GLSL ES 1.00";
}
int nextBufferSize = result.size() + 1;

+ 22
- 26
androidOS_files/patch_fix-webview.patch View File

@ -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;
}

Loading…
Cancel
Save