mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Update the native_viewport interface to allow specification of the surface configuration, currently only needed for and used by EGL on Android.
This also fixes an issue where eglChooseConfig was only being called in InitializeOneOff, which is only called once per process. This CL makes choosing the config happen once per GLSurface instead, which will ultimately permit apps to create multiple native_viewports with different surface configurations on the same display. The eglDisplay object is still a global, though. R=abarth@chromium.org, viettrungluu@chromium.org, jamesr@chromium.org Review URL: https://codereview.chromium.org/1168993002.
This commit is contained in:
parent
413080ef6a
commit
08bd78a9eb
@ -37,7 +37,8 @@ base::WeakPtr<Rasterizer> Rasterizer::GetWeakPtr() {
|
||||
}
|
||||
|
||||
void Rasterizer::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) {
|
||||
surface_ = gfx::GLSurface::CreateViewGLSurface(widget);
|
||||
surface_ = gfx::GLSurface::CreateViewGLSurface(widget,
|
||||
gfx::SurfaceConfiguration());
|
||||
CHECK(surface_) << "GLSurface required.";
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user