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

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

Issue 2190353003: Delete old Ozone surface creation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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/platform/x11/x11_surface_factory.h ('k') | ui/ozone/public/surface_factory_ozone.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/x11_surface_factory.h" 5 #include "ui/ozone/platform/x11/x11_surface_factory.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 8
9 #include "third_party/khronos/EGL/egl.h" 9 #include "third_party/khronos/EGL/egl.h"
10 #include "ui/gfx/x/x11_types.h" 10 #include "ui/gfx/x/x11_types.h"
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 GLSurfaceEGLOzoneX11::~GLSurfaceEGLOzoneX11() { 118 GLSurfaceEGLOzoneX11::~GLSurfaceEGLOzoneX11() {
119 Destroy(); 119 Destroy();
120 } 120 }
121 121
122 } // namespace 122 } // namespace
123 123
124 X11SurfaceFactory::X11SurfaceFactory() {} 124 X11SurfaceFactory::X11SurfaceFactory() {}
125 125
126 X11SurfaceFactory::~X11SurfaceFactory() {} 126 X11SurfaceFactory::~X11SurfaceFactory() {}
127 127
128 bool X11SurfaceFactory::UseNewSurfaceAPI() {
129 return true;
130 }
131
132 scoped_refptr<gl::GLSurface> X11SurfaceFactory::CreateViewGLSurface( 128 scoped_refptr<gl::GLSurface> X11SurfaceFactory::CreateViewGLSurface(
133 gl::GLImplementation implementation, 129 gl::GLImplementation implementation,
134 gfx::AcceleratedWidget widget) { 130 gfx::AcceleratedWidget widget) {
135 if (implementation != gl::kGLImplementationEGLGLES2) { 131 if (implementation != gl::kGLImplementationEGLGLES2) {
136 NOTREACHED(); 132 NOTREACHED();
137 return nullptr; 133 return nullptr;
138 } 134 }
139 135
140 return gl::InitializeGLSurface(new GLSurfaceEGLOzoneX11(widget)); 136 return gl::InitializeGLSurface(new GLSurfaceEGLOzoneX11(widget));
141 } 137 }
(...skipping 13 matching lines...) Expand all
155 AddGLLibraryCallback add_gl_library, 151 AddGLLibraryCallback add_gl_library,
156 SetGLGetProcAddressProcCallback set_gl_get_proc_address) { 152 SetGLGetProcAddressProcCallback set_gl_get_proc_address) {
157 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address); 153 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address);
158 } 154 }
159 155
160 intptr_t X11SurfaceFactory::GetNativeDisplay() { 156 intptr_t X11SurfaceFactory::GetNativeDisplay() {
161 return reinterpret_cast<intptr_t>(gfx::GetXDisplay()); 157 return reinterpret_cast<intptr_t>(gfx::GetXDisplay());
162 } 158 }
163 159
164 } // namespace ui 160 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/x11/x11_surface_factory.h ('k') | ui/ozone/public/surface_factory_ozone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698