From 08bd78a9eb018f1f35f3dafde161ef40dd707215 Mon Sep 17 00:00:00 2001 From: Ian Fischer Date: Tue, 9 Jun 2015 16:50:28 -0700 Subject: [PATCH] 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. --- engine/src/flutter/shell/gpu/rasterizer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/gpu/rasterizer.cc b/engine/src/flutter/shell/gpu/rasterizer.cc index 52a5525c8d1..cb56a054a45 100644 --- a/engine/src/flutter/shell/gpu/rasterizer.cc +++ b/engine/src/flutter/shell/gpu/rasterizer.cc @@ -37,7 +37,8 @@ base::WeakPtr Rasterizer::GetWeakPtr() { } void Rasterizer::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) { - surface_ = gfx::GLSurface::CreateViewGLSurface(widget); + surface_ = gfx::GLSurface::CreateViewGLSurface(widget, + gfx::SurfaceConfiguration()); CHECK(surface_) << "GLSurface required."; }