| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/drm/gpu/gbm_surface_factory.h" | 5 #include "ui/ozone/platform/drm/gpu/gbm_surface_factory.h" |
| 6 | 6 |
| 7 #include <gbm.h> | 7 #include <gbm.h> |
| 8 | 8 |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 bool GbmSurfaceFactory::LoadEGLGLES2Bindings( | 78 bool GbmSurfaceFactory::LoadEGLGLES2Bindings( |
| 79 AddGLLibraryCallback add_gl_library, | 79 AddGLLibraryCallback add_gl_library, |
| 80 SetGLGetProcAddressProcCallback set_gl_get_proc_address) { | 80 SetGLGetProcAddressProcCallback set_gl_get_proc_address) { |
| 81 DCHECK(thread_checker_.CalledOnValidThread()); | 81 DCHECK(thread_checker_.CalledOnValidThread()); |
| 82 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address); | 82 return LoadDefaultEGLGLES2Bindings(add_gl_library, set_gl_get_proc_address); |
| 83 } | 83 } |
| 84 | 84 |
| 85 scoped_ptr<SurfaceOzoneCanvas> GbmSurfaceFactory::CreateCanvasForWidget( | 85 scoped_ptr<SurfaceOzoneCanvas> GbmSurfaceFactory::CreateCanvasForWidget( |
| 86 gfx::AcceleratedWidget widget) { | 86 gfx::AcceleratedWidget widget) { |
| 87 DCHECK(thread_checker_.CalledOnValidThread()); | 87 DCHECK(thread_checker_.CalledOnValidThread()); |
| 88 LOG(FATAL) << "Software rendering mode is not supported with GBM platform"; | 88 LOG(ERROR) << "Software rendering mode is not supported with GBM platform"; |
| 89 return nullptr; | 89 return nullptr; |
| 90 } | 90 } |
| 91 | 91 |
| 92 scoped_ptr<SurfaceOzoneEGL> GbmSurfaceFactory::CreateEGLSurfaceForWidget( | 92 scoped_ptr<SurfaceOzoneEGL> GbmSurfaceFactory::CreateEGLSurfaceForWidget( |
| 93 gfx::AcceleratedWidget widget) { | 93 gfx::AcceleratedWidget widget) { |
| 94 NOTREACHED(); | 94 NOTREACHED(); |
| 95 return nullptr; | 95 return nullptr; |
| 96 } | 96 } |
| 97 | 97 |
| 98 scoped_ptr<SurfaceOzoneEGL> | 98 scoped_ptr<SurfaceOzoneEGL> |
| (...skipping 28 matching lines...) Expand all Loading... |
| 127 } | 127 } |
| 128 | 128 |
| 129 scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmapFromHandle( | 129 scoped_refptr<ui::NativePixmap> GbmSurfaceFactory::CreateNativePixmapFromHandle( |
| 130 const gfx::NativePixmapHandle& handle) { | 130 const gfx::NativePixmapHandle& handle) { |
| 131 scoped_refptr<GbmPixmap> pixmap(new GbmPixmap(this)); | 131 scoped_refptr<GbmPixmap> pixmap(new GbmPixmap(this)); |
| 132 pixmap->Initialize(base::ScopedFD(handle.fd.fd), handle.stride); | 132 pixmap->Initialize(base::ScopedFD(handle.fd.fd), handle.stride); |
| 133 return pixmap; | 133 return pixmap; |
| 134 } | 134 } |
| 135 | 135 |
| 136 } // namespace ui | 136 } // namespace ui |
| OLD | NEW |