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

Side by Side Diff: ui/ozone/platform/wayland/wayland_surface_factory.cc

Issue 2253173002: Remove callbacks for SurfaceFactoryOzone::LoadEGLGLES2Bindings(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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/wayland/wayland_surface_factory.h" 5 #include "ui/ozone/platform/wayland/wayland_surface_factory.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <sys/mman.h> 8 #include <sys/mman.h>
9 #include <wayland-client.h> 9 #include <wayland-client.h>
10 10
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 return gl::InitializeGLSurface(new gl::PbufferGLSurfaceEGL(size)); 165 return gl::InitializeGLSurface(new gl::PbufferGLSurfaceEGL(size));
166 #else 166 #else
167 return nullptr; 167 return nullptr;
168 #endif 168 #endif
169 } 169 }
170 170
171 intptr_t WaylandSurfaceFactory::GetNativeDisplay() { 171 intptr_t WaylandSurfaceFactory::GetNativeDisplay() {
172 return reinterpret_cast<intptr_t>(connection_->display()); 172 return reinterpret_cast<intptr_t>(connection_->display());
173 } 173 }
174 174
175 bool WaylandSurfaceFactory::LoadEGLGLES2Bindings( 175 bool WaylandSurfaceFactory::LoadEGLGLES2Bindings() {
176 AddGLLibraryCallback add_gl_library,
177 SetGLGetProcAddressProcCallback set_gl_get_proc_address) {
178 #if defined(USE_WAYLAND_EGL) 176 #if defined(USE_WAYLAND_EGL)
179 if (!connection_) 177 if (!connection_)
180 return false; 178 return false;
181 setenv("EGL_PLATFORM", "wayland", 0); 179 setenv("EGL_PLATFORM", "wayland", 0);
182 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address); 180 return LoadDefaultEGLGLES2Bindings();
183 #else 181 #else
184 return false; 182 return false;
185 #endif 183 #endif
186 } 184 }
187 185
188 std::unique_ptr<SurfaceOzoneCanvas> 186 std::unique_ptr<SurfaceOzoneCanvas>
189 WaylandSurfaceFactory::CreateCanvasForWidget(gfx::AcceleratedWidget widget) { 187 WaylandSurfaceFactory::CreateCanvasForWidget(gfx::AcceleratedWidget widget) {
190 WaylandWindow* window = connection_->GetWindow(widget); 188 WaylandWindow* window = connection_->GetWindow(widget);
191 DCHECK(window); 189 DCHECK(window);
192 return base::WrapUnique(new WaylandCanvasSurface(connection_, window)); 190 return base::WrapUnique(new WaylandCanvasSurface(connection_, window));
(...skipping 11 matching lines...) Expand all
204 scoped_refptr<NativePixmap> WaylandSurfaceFactory::CreateNativePixmapFromHandle( 202 scoped_refptr<NativePixmap> WaylandSurfaceFactory::CreateNativePixmapFromHandle(
205 gfx::AcceleratedWidget widget, 203 gfx::AcceleratedWidget widget,
206 gfx::Size size, 204 gfx::Size size,
207 gfx::BufferFormat format, 205 gfx::BufferFormat format,
208 const gfx::NativePixmapHandle& handle) { 206 const gfx::NativePixmapHandle& handle) {
209 NOTIMPLEMENTED(); 207 NOTIMPLEMENTED();
210 return nullptr; 208 return nullptr;
211 } 209 }
212 210
213 } // namespace ui 211 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/wayland_surface_factory.h ('k') | ui/ozone/platform/x11/x11_surface_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698