| Index: ui/gl/gl_surface_egl.cc
|
| diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
|
| index 9196ca0b094fb5621a4fc78e7efec853cd56b91f..497c0e61b054de278c0b5755fd15c53de56512f3 100644
|
| --- a/ui/gl/gl_surface_egl.cc
|
| +++ b/ui/gl/gl_surface_egl.cc
|
| @@ -271,7 +271,7 @@ bool ValidateEglConfig(EGLDisplay display,
|
| return true;
|
| }
|
|
|
| -EGLConfig ChooseConfig(GLSurfaceFormat format) {
|
| +EGLConfig ChooseConfig(GLSurfaceFormat format, bool surfaceless) {
|
| // Choose an EGL configuration.
|
| // On X this is only used for PBuffer surfaces.
|
|
|
| @@ -299,9 +299,8 @@ EGLConfig ChooseConfig(GLSurfaceFormat format) {
|
| }
|
| #endif
|
|
|
| - EGLint surface_type = (format.IsSurfaceless()
|
| - ? EGL_DONT_CARE
|
| - : EGL_WINDOW_BIT | EGL_PBUFFER_BIT);
|
| + EGLint surface_type =
|
| + (surfaceless ? EGL_DONT_CARE : EGL_WINDOW_BIT | EGL_PBUFFER_BIT);
|
|
|
| for (auto renderable_type : renderable_types) {
|
| EGLint config_attribs_8888[] = {EGL_BUFFER_SIZE,
|
| @@ -495,7 +494,7 @@ EGLDisplay GLSurfaceEGL::GetDisplay() {
|
|
|
| EGLConfig GLSurfaceEGL::GetConfig() {
|
| if (!config_) {
|
| - config_ = ChooseConfig(format_);
|
| + config_ = ChooseConfig(format_, IsSurfaceless());
|
| }
|
| return config_;
|
| }
|
| @@ -1201,14 +1200,9 @@ PbufferGLSurfaceEGL::~PbufferGLSurfaceEGL() {
|
| Destroy();
|
| }
|
|
|
| -SurfacelessEGL::SurfacelessEGL(const gfx::Size& size)
|
| - : size_(size) {
|
| - format_ = GLSurfaceFormat();
|
| - format_.SetIsSurfaceless();
|
| -}
|
| +SurfacelessEGL::SurfacelessEGL(const gfx::Size& size) : size_(size) {}
|
|
|
| bool SurfacelessEGL::Initialize(GLSurfaceFormat format) {
|
| - format.SetIsSurfaceless();
|
| format_ = format;
|
| return true;
|
| }
|
|
|