Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: ui/ozone/common/gl_ozone_osmesa.cc

Issue 2731733002: Convert Ozone GL OSMesa implementation. (Closed)
Patch Set: Cleanup. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "ui/ozone/common/gl_ozone_osmesa.h"
6
7 #include "ui/gl/gl_bindings.h"
8 #include "ui/gl/gl_context.h"
9 #include "ui/gl/gl_context_osmesa.h"
10 #include "ui/gl/gl_gl_api_implementation.h"
11 #include "ui/gl/gl_implementation_osmesa.h"
12 #include "ui/gl/gl_osmesa_api_implementation.h"
13 #include "ui/gl/gl_share_group.h"
14 #include "ui/gl/gl_surface.h"
15 #include "ui/gl/gl_surface_format.h"
16 #include "ui/gl/gl_surface_osmesa.h"
17
18 namespace ui {
19
20 bool GLOzoneOSMesa::InitializeGLOneOffPlatform() {
21 return true;
22 }
23
24 bool GLOzoneOSMesa::InitializeStaticGLBindings(
25 gl::GLImplementation implementation) {
26 return gl::InitializeStaticGLBindingsOSMesaGL();
27 }
28
29 void GLOzoneOSMesa::InitializeDebugGLBindings() {
30 gl::InitializeDebugGLBindingsGL();
31 gl::InitializeDebugGLBindingsOSMESA();
32 }
33
34 void GLOzoneOSMesa::ShutdownGL() {
35 gl::ClearBindingsGL();
36 gl::ClearBindingsOSMESA();
37 }
38
39 bool GLOzoneOSMesa::GetGLWindowSystemBindingInfo(
40 gl::GLWindowSystemBindingInfo* info) {
41 return false;
42 }
43
44 scoped_refptr<gl::GLContext> GLOzoneOSMesa::CreateGLContext(
45 gl::GLShareGroup* share_group,
46 gl::GLSurface* compatible_surface,
47 const gl::GLContextAttribs& attribs) {
48 return gl::InitializeGLContext(new gl::GLContextOSMesa(share_group),
49 compatible_surface, attribs);
50 }
51
52 scoped_refptr<gl::GLSurface> GLOzoneOSMesa::CreateViewGLSurface(
53 gfx::AcceleratedWidget window) {
54 return gl::InitializeGLSurface(new gl::GLSurfaceOSMesaHeadless());
55 }
56
57 scoped_refptr<gl::GLSurface> GLOzoneOSMesa::CreateSurfacelessViewGLSurface(
58 gfx::AcceleratedWidget window) {
59 return nullptr;
60 }
61
62 scoped_refptr<gl::GLSurface> GLOzoneOSMesa::CreateOffscreenGLSurface(
63 const gfx::Size& size) {
64 return gl::InitializeGLSurface(
65 new gl::GLSurfaceOSMesa(gl::GLSurfaceFormat::PIXEL_LAYOUT_BGRA, size));
66 }
67
68 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698