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

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

Issue 2731733002: Convert Ozone GL OSMesa implementation. (Closed)
Patch Set: Fix rebase. 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
« no previous file with comments | « ui/ozone/common/gl_ozone_osmesa.h ('k') | ui/ozone/platform/cast/surface_factory_cast.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 GLOzoneOSMesa::GLOzoneOSMesa() {}
21
22 GLOzoneOSMesa::~GLOzoneOSMesa() {}
23
24 bool GLOzoneOSMesa::InitializeGLOneOffPlatform() {
25 return true;
26 }
27
28 bool GLOzoneOSMesa::InitializeStaticGLBindings(
29 gl::GLImplementation implementation) {
30 return gl::InitializeStaticGLBindingsOSMesaGL();
31 }
32
33 void GLOzoneOSMesa::InitializeDebugGLBindings() {
34 gl::InitializeDebugGLBindingsGL();
35 gl::InitializeDebugGLBindingsOSMESA();
36 }
37
38 void GLOzoneOSMesa::ShutdownGL() {
39 gl::ClearBindingsGL();
40 gl::ClearBindingsOSMESA();
41 }
42
43 bool GLOzoneOSMesa::GetGLWindowSystemBindingInfo(
44 gl::GLWindowSystemBindingInfo* info) {
45 return false;
46 }
47
48 scoped_refptr<gl::GLContext> GLOzoneOSMesa::CreateGLContext(
49 gl::GLShareGroup* share_group,
50 gl::GLSurface* compatible_surface,
51 const gl::GLContextAttribs& attribs) {
52 return gl::InitializeGLContext(new gl::GLContextOSMesa(share_group),
53 compatible_surface, attribs);
54 }
55
56 scoped_refptr<gl::GLSurface> GLOzoneOSMesa::CreateViewGLSurface(
57 gfx::AcceleratedWidget window) {
58 return gl::InitializeGLSurface(new gl::GLSurfaceOSMesaHeadless());
59 }
60
61 scoped_refptr<gl::GLSurface> GLOzoneOSMesa::CreateSurfacelessViewGLSurface(
62 gfx::AcceleratedWidget window) {
63 return nullptr;
64 }
65
66 scoped_refptr<gl::GLSurface> GLOzoneOSMesa::CreateOffscreenGLSurface(
67 const gfx::Size& size) {
68 return gl::InitializeGLSurface(
69 new gl::GLSurfaceOSMesa(gl::GLSurfaceFormat::PIXEL_LAYOUT_BGRA, size));
70 }
71
72 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/common/gl_ozone_osmesa.h ('k') | ui/ozone/platform/cast/surface_factory_cast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698