[Android] choose 24 bit depth buffer. (flutter/engine#56553)
Fixes https://github.com/flutter/flutter/issues/158531 Make sure the onscreen framebuffer has a depth attachment that matches the depth24_s8 format expected.
This commit is contained in:
@@ -35,6 +35,7 @@ enum class StencilBits {
|
||||
enum class DepthBits {
|
||||
kZero = 0,
|
||||
kEight = 8,
|
||||
kTwentyFour = 24,
|
||||
};
|
||||
|
||||
enum class SurfaceType {
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -38,6 +38,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
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user