OLD | NEW |
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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address); | 182 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address); |
183 #else | 183 #else |
184 return false; | 184 return false; |
185 #endif | 185 #endif |
186 } | 186 } |
187 | 187 |
188 std::unique_ptr<SurfaceOzoneCanvas> | 188 std::unique_ptr<SurfaceOzoneCanvas> |
189 WaylandSurfaceFactory::CreateCanvasForWidget(gfx::AcceleratedWidget widget) { | 189 WaylandSurfaceFactory::CreateCanvasForWidget(gfx::AcceleratedWidget widget) { |
190 WaylandWindow* window = connection_->GetWindow(widget); | 190 WaylandWindow* window = connection_->GetWindow(widget); |
191 DCHECK(window); | 191 DCHECK(window); |
192 return base::WrapUnique(new WaylandCanvasSurface(connection_, window)); | 192 return base::MakeUnique<WaylandCanvasSurface>(connection_, window); |
193 } | 193 } |
194 | 194 |
195 scoped_refptr<NativePixmap> WaylandSurfaceFactory::CreateNativePixmap( | 195 scoped_refptr<NativePixmap> WaylandSurfaceFactory::CreateNativePixmap( |
196 gfx::AcceleratedWidget widget, | 196 gfx::AcceleratedWidget widget, |
197 gfx::Size size, | 197 gfx::Size size, |
198 gfx::BufferFormat format, | 198 gfx::BufferFormat format, |
199 gfx::BufferUsage usage) { | 199 gfx::BufferUsage usage) { |
200 NOTIMPLEMENTED(); | 200 NOTIMPLEMENTED(); |
201 return nullptr; | 201 return nullptr; |
202 } | 202 } |
203 | 203 |
204 scoped_refptr<NativePixmap> WaylandSurfaceFactory::CreateNativePixmapFromHandle( | 204 scoped_refptr<NativePixmap> WaylandSurfaceFactory::CreateNativePixmapFromHandle( |
205 gfx::AcceleratedWidget widget, | 205 gfx::AcceleratedWidget widget, |
206 gfx::Size size, | 206 gfx::Size size, |
207 gfx::BufferFormat format, | 207 gfx::BufferFormat format, |
208 const gfx::NativePixmapHandle& handle) { | 208 const gfx::NativePixmapHandle& handle) { |
209 NOTIMPLEMENTED(); | 209 NOTIMPLEMENTED(); |
210 return nullptr; | 210 return nullptr; |
211 } | 211 } |
212 | 212 |
213 } // namespace ui | 213 } // namespace ui |
OLD | NEW |