| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/ozone/common/gl_ozone_egl.h" | 5 #include "ui/ozone/common/gl_ozone_egl.h" |
| 6 | 6 |
| 7 #include "ui/gl/gl_bindings.h" | 7 #include "ui/gl/gl_bindings.h" |
| 8 #include "ui/gl/gl_context.h" | 8 #include "ui/gl/gl_context.h" |
| 9 #include "ui/gl/gl_context_egl.h" | 9 #include "ui/gl/gl_context_egl.h" |
| 10 #include "ui/gl/gl_egl_api_implementation.h" | 10 #include "ui/gl/gl_egl_api_implementation.h" |
| 11 #include "ui/gl/gl_gl_api_implementation.h" | 11 #include "ui/gl/gl_gl_api_implementation.h" |
| 12 #include "ui/gl/gl_share_group.h" | 12 #include "ui/gl/gl_share_group.h" |
| 13 #include "ui/gl/gl_surface.h" | 13 #include "ui/gl/gl_surface.h" |
| 14 #include "ui/gl/gl_surface_egl.h" | 14 #include "ui/gl/gl_surface_egl.h" |
| 15 | 15 |
| 16 namespace ui { | 16 namespace ui { |
| 17 | 17 |
| 18 bool GLOzoneEGL::InitializeGLOneOffPlatform() { | 18 bool GLOzoneEGL::InitializeGLOneOffPlatform() { |
| 19 if (!gl::GLSurfaceEGL::InitializeOneOff(GetNativeDisplay())) { | 19 if (!gl::GLSurfaceEGL::InitializeOneOff(GetNativeDisplay())) { |
| 20 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; | 20 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; |
| 21 return false; | 21 return false; |
| 22 } | 22 } |
| 23 return true; | 23 return true; |
| 24 } | 24 } |
| 25 | 25 |
| 26 bool GLOzoneEGL::InitializeStaticGLBindings( | 26 bool GLOzoneEGL::InitializeStaticGLBindings( |
| 27 gl::GLImplementation implementation) { | 27 gl::GLImplementation implementation) { |
| 28 if (!LoadGLES2Bindings()) | 28 if (!LoadGLES2Bindings(implementation)) |
| 29 return false; | 29 return false; |
| 30 | 30 |
| 31 gl::SetGLImplementation(gl::kGLImplementationEGLGLES2); | 31 gl::SetGLImplementation(gl::kGLImplementationEGLGLES2); |
| 32 gl::InitializeStaticGLBindingsGL(); | 32 gl::InitializeStaticGLBindingsGL(); |
| 33 gl::InitializeStaticGLBindingsEGL(); | 33 gl::InitializeStaticGLBindingsEGL(); |
| 34 | 34 |
| 35 return true; | 35 return true; |
| 36 } | 36 } |
| 37 | 37 |
| 38 void GLOzoneEGL::InitializeDebugGLBindings() { | 38 void GLOzoneEGL::InitializeDebugGLBindings() { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 59 compatible_surface, attribs); | 59 compatible_surface, attribs); |
| 60 } | 60 } |
| 61 | 61 |
| 62 scoped_refptr<gl::GLSurface> GLOzoneEGL::CreateSurfacelessViewGLSurface( | 62 scoped_refptr<gl::GLSurface> GLOzoneEGL::CreateSurfacelessViewGLSurface( |
| 63 gfx::AcceleratedWidget window) { | 63 gfx::AcceleratedWidget window) { |
| 64 // This will usually not be implemented by the platform specific version. | 64 // This will usually not be implemented by the platform specific version. |
| 65 return nullptr; | 65 return nullptr; |
| 66 } | 66 } |
| 67 | 67 |
| 68 } // namespace ui | 68 } // namespace ui |
| OLD | NEW |