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 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ |
6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 18 matching lines...) Expand all Loading... |
29 void UnregisterSurface(gfx::AcceleratedWidget widget); | 29 void UnregisterSurface(gfx::AcceleratedWidget widget); |
30 GbmSurfaceless* GetSurface(gfx::AcceleratedWidget widget) const; | 30 GbmSurfaceless* GetSurface(gfx::AcceleratedWidget widget) const; |
31 | 31 |
32 // SurfaceFactoryOzone: | 32 // SurfaceFactoryOzone: |
33 intptr_t GetNativeDisplay() override; | 33 intptr_t GetNativeDisplay() override; |
34 std::vector<gfx::BufferFormat> GetScanoutFormats( | 34 std::vector<gfx::BufferFormat> GetScanoutFormats( |
35 gfx::AcceleratedWidget widget) override; | 35 gfx::AcceleratedWidget widget) override; |
36 bool LoadEGLGLES2Bindings( | 36 bool LoadEGLGLES2Bindings( |
37 AddGLLibraryCallback add_gl_library, | 37 AddGLLibraryCallback add_gl_library, |
38 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override; | 38 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override; |
39 scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( | 39 std::unique_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( |
40 gfx::AcceleratedWidget widget) override; | 40 gfx::AcceleratedWidget widget) override; |
41 scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( | 41 std::unique_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( |
42 gfx::AcceleratedWidget w) override; | 42 gfx::AcceleratedWidget w) override; |
43 scoped_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget( | 43 std::unique_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget( |
44 gfx::AcceleratedWidget widget) override; | 44 gfx::AcceleratedWidget widget) override; |
45 scoped_refptr<ui::NativePixmap> CreateNativePixmap( | 45 scoped_refptr<ui::NativePixmap> CreateNativePixmap( |
46 gfx::AcceleratedWidget widget, | 46 gfx::AcceleratedWidget widget, |
47 gfx::Size size, | 47 gfx::Size size, |
48 gfx::BufferFormat format, | 48 gfx::BufferFormat format, |
49 gfx::BufferUsage usage) override; | 49 gfx::BufferUsage usage) override; |
50 scoped_refptr<NativePixmap> CreateNativePixmapFromHandle( | 50 scoped_refptr<NativePixmap> CreateNativePixmapFromHandle( |
51 gfx::Size size, | 51 gfx::Size size, |
52 gfx::BufferFormat format, | 52 gfx::BufferFormat format, |
53 const gfx::NativePixmapHandle& handle) override; | 53 const gfx::NativePixmapHandle& handle) override; |
54 | 54 |
55 private: | 55 private: |
56 base::ThreadChecker thread_checker_; | 56 base::ThreadChecker thread_checker_; |
57 | 57 |
58 DrmThreadProxy* drm_thread_; | 58 DrmThreadProxy* drm_thread_; |
59 | 59 |
60 std::map<gfx::AcceleratedWidget, GbmSurfaceless*> widget_to_surface_map_; | 60 std::map<gfx::AcceleratedWidget, GbmSurfaceless*> widget_to_surface_map_; |
61 | 61 |
62 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); | 62 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); |
63 }; | 63 }; |
64 | 64 |
65 } // namespace ui | 65 } // namespace ui |
66 | 66 |
67 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ | 67 #endif // UI_OZONE_PLATFORM_DRM_GPU_GBM_SURFACE_FACTORY_H_ |
OLD | NEW |