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_DRI_GBM_SURFACE_FACTORY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ |
6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ | 6 #define UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ |
7 | 7 |
8 #include "ui/ozone/platform/dri/dri_surface_factory.h" | 8 #include "ui/ozone/platform/dri/dri_surface_factory.h" |
9 | 9 |
10 struct gbm_device; | 10 struct gbm_device; |
11 | 11 |
12 namespace ui { | 12 namespace ui { |
13 | 13 |
14 class DriWindowDelegate; | 14 class DriWindowDelegate; |
15 class DriWindowManager; | 15 class DriWindowManager; |
16 | 16 |
17 class GbmSurfaceFactory : public DriSurfaceFactory { | 17 class GbmSurfaceFactory : public DriSurfaceFactory { |
18 public: | 18 public: |
19 GbmSurfaceFactory(bool allow_surfaceless); | 19 GbmSurfaceFactory(bool allow_surfaceless); |
20 virtual ~GbmSurfaceFactory(); | 20 virtual ~GbmSurfaceFactory(); |
21 | 21 |
22 void InitializeGpu(DriWrapper* dri, | 22 void InitializeGpu(DriWrapper* dri, |
23 gbm_device* device, | 23 gbm_device* device, |
24 ScreenManager* screen_manager, | 24 ScreenManager* screen_manager, |
25 DriWindowManager* window_manager); | 25 DriWindowManager* window_manager); |
26 | 26 |
27 // DriSurfaceFactory: | 27 // DriSurfaceFactory: |
28 virtual intptr_t GetNativeDisplay() OVERRIDE; | 28 virtual intptr_t GetNativeDisplay() OVERRIDE; |
| 29 virtual int GetDrmFd() OVERRIDE; |
29 virtual const int32_t* GetEGLSurfaceProperties( | 30 virtual const int32_t* GetEGLSurfaceProperties( |
30 const int32_t* desired_list) OVERRIDE; | 31 const int32_t* desired_list) OVERRIDE; |
31 virtual bool LoadEGLGLES2Bindings( | 32 virtual bool LoadEGLGLES2Bindings( |
32 AddGLLibraryCallback add_gl_library, | 33 AddGLLibraryCallback add_gl_library, |
33 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; | 34 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; |
34 virtual scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( | 35 virtual scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( |
35 gfx::AcceleratedWidget w) OVERRIDE; | 36 gfx::AcceleratedWidget w) OVERRIDE; |
36 virtual scoped_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget( | 37 virtual scoped_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget( |
37 gfx::AcceleratedWidget widget) OVERRIDE; | 38 gfx::AcceleratedWidget widget) OVERRIDE; |
38 virtual scoped_refptr<ui::NativePixmap> CreateNativePixmap( | 39 virtual scoped_refptr<ui::NativePixmap> CreateNativePixmap( |
(...skipping 14 matching lines...) Expand all Loading... |
53 | 54 |
54 gbm_device* device_; // Not owned. | 55 gbm_device* device_; // Not owned. |
55 bool allow_surfaceless_; | 56 bool allow_surfaceless_; |
56 | 57 |
57 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); | 58 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); |
58 }; | 59 }; |
59 | 60 |
60 } // namespace ui | 61 } // namespace ui |
61 | 62 |
62 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ | 63 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ |
OLD | NEW |