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

Side by Side Diff: ui/ozone/platform/x11/gl_ozone_glx.cc

Issue 2480373002: Refactor context creation parameters into a struct. (Closed)
Patch Set: Created 4 years, 1 month 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
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/platform/x11/gl_ozone_glx.h" 5 #include "ui/ozone/platform/x11/gl_ozone_glx.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "ui/gl/gl_context.h" 8 #include "ui/gl/gl_context.h"
9 #include "ui/gl/gl_context_glx.h" 9 #include "ui/gl/gl_context_glx.h"
10 #include "ui/gl/gl_gl_api_implementation.h" 10 #include "ui/gl/gl_gl_api_implementation.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } 78 }
79 79
80 bool GLOzoneGLX::GetGLWindowSystemBindingInfo( 80 bool GLOzoneGLX::GetGLWindowSystemBindingInfo(
81 gl::GLWindowSystemBindingInfo* info) { 81 gl::GLWindowSystemBindingInfo* info) {
82 return gl::GetGLWindowSystemBindingInfoGLX(info); 82 return gl::GetGLWindowSystemBindingInfoGLX(info);
83 } 83 }
84 84
85 scoped_refptr<gl::GLContext> GLOzoneGLX::CreateGLContext( 85 scoped_refptr<gl::GLContext> GLOzoneGLX::CreateGLContext(
86 gl::GLShareGroup* share_group, 86 gl::GLShareGroup* share_group,
87 gl::GLSurface* compatible_surface, 87 gl::GLSurface* compatible_surface,
88 gl::GpuPreference gpu_preference) { 88 const gl::GLContextAttribs& attribs) {
89 return gl::InitializeGLContext(new gl::GLContextGLX(share_group), 89 return gl::InitializeGLContext(new gl::GLContextGLX(share_group),
90 compatible_surface, gpu_preference); 90 compatible_surface, attribs);
91 } 91 }
92 92
93 scoped_refptr<gl::GLSurface> GLOzoneGLX::CreateViewGLSurface( 93 scoped_refptr<gl::GLSurface> GLOzoneGLX::CreateViewGLSurface(
94 gfx::AcceleratedWidget window) { 94 gfx::AcceleratedWidget window) {
95 return gl::InitializeGLSurface(new GLSurfaceGLXOzone(window)); 95 return gl::InitializeGLSurface(new GLSurfaceGLXOzone(window));
96 } 96 }
97 97
98 scoped_refptr<gl::GLSurface> GLOzoneGLX::CreateSurfacelessViewGLSurface( 98 scoped_refptr<gl::GLSurface> GLOzoneGLX::CreateSurfacelessViewGLSurface(
99 gfx::AcceleratedWidget window) { 99 gfx::AcceleratedWidget window) {
100 return nullptr; 100 return nullptr;
101 } 101 }
102 102
103 scoped_refptr<gl::GLSurface> GLOzoneGLX::CreateOffscreenGLSurface( 103 scoped_refptr<gl::GLSurface> GLOzoneGLX::CreateOffscreenGLSurface(
104 const gfx::Size& size) { 104 const gfx::Size& size) {
105 return gl::InitializeGLSurface(new gl::UnmappedNativeViewGLSurfaceGLX(size)); 105 return gl::InitializeGLSurface(new gl::UnmappedNativeViewGLSurfaceGLX(size));
106 } 106 }
107 107
108 } // namespace ui 108 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698