From 321e93ea6539075bf29a13350e6d1553f8c3c3e8 Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Tue, 12 Nov 2024 21:35:33 -0800 Subject: [PATCH 1/3] [Android] choose 24 bit depth buffer. --- impeller/toolkit/egl/config.h | 1 + shell/platform/android/android_context_gl_impeller.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/impeller/toolkit/egl/config.h b/impeller/toolkit/egl/config.h index 37de0e1374485..6690ee2db6f67 100644 --- a/impeller/toolkit/egl/config.h +++ b/impeller/toolkit/egl/config.h @@ -35,6 +35,7 @@ enum class StencilBits { enum class DepthBits { kZero = 0, kEight = 8, + kTwentyFour = 24, }; enum class SurfaceType { diff --git a/shell/platform/android/android_context_gl_impeller.cc b/shell/platform/android/android_context_gl_impeller.cc index 79091a108f9c1..c497565c7f6d8 100644 --- a/shell/platform/android/android_context_gl_impeller.cc +++ b/shell/platform/android/android_context_gl_impeller.cc @@ -94,7 +94,7 @@ AndroidContextGLImpeller::AndroidContextGLImpeller( impeller::egl::ConfigDescriptor desc; desc.api = impeller::egl::API::kOpenGLES2; desc.color_format = impeller::egl::ColorFormat::kRGBA8888; - desc.depth_bits = impeller::egl::DepthBits::kZero; + desc.depth_bits = impeller::egl::DepthBits::kTwentyFour; desc.stencil_bits = impeller::egl::StencilBits::kEight; desc.samples = impeller::egl::Samples::kFour; From 498e9e20753b60f8f7a929d2cafc42de41c84f5d Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Wed, 13 Nov 2024 10:29:05 -0800 Subject: [PATCH 2/3] is this a test? --- .../platform/android/android_context_gl_impeller_unittests.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shell/platform/android/android_context_gl_impeller_unittests.cc b/shell/platform/android/android_context_gl_impeller_unittests.cc index 6d8243e8dd2cb..61f1839efb341 100644 --- a/shell/platform/android/android_context_gl_impeller_unittests.cc +++ b/shell/platform/android/android_context_gl_impeller_unittests.cc @@ -5,6 +5,7 @@ #include "flutter/shell/platform/android/android_context_gl_impeller.h" #include "gmock/gmock.h" #include "gtest/gtest.h" +#include "third_party/angle/include/EGL/egl.h" namespace flutter { namespace testing { @@ -38,6 +39,8 @@ bool GetEGLConfigForSurface(EGLint surface_bit, EGLConfig* result) { EGL_GREEN_SIZE, 8, EGL_BLUE_SIZE, 8, EGL_ALPHA_SIZE, 8, + EGL_DEPTH_SIZE, 24, + EGL_STENCIL_SIZE, 8, EGL_NONE, // clang-format on }; From fd8476dc8fabeb179abb7f990ee8248aa59a624b Mon Sep 17 00:00:00 2001 From: jonahwilliams Date: Wed, 13 Nov 2024 10:29:37 -0800 Subject: [PATCH 3/3] ++ --- shell/platform/android/android_context_gl_impeller_unittests.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/shell/platform/android/android_context_gl_impeller_unittests.cc b/shell/platform/android/android_context_gl_impeller_unittests.cc index 61f1839efb341..509c8df6f0bb0 100644 --- a/shell/platform/android/android_context_gl_impeller_unittests.cc +++ b/shell/platform/android/android_context_gl_impeller_unittests.cc @@ -5,7 +5,6 @@ #include "flutter/shell/platform/android/android_context_gl_impeller.h" #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "third_party/angle/include/EGL/egl.h" namespace flutter { namespace testing {