| 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 GbmSurfaceFactory : public DriSurfaceFactory { | 14 class GbmSurfaceFactory : public DriSurfaceFactory { |
| 15 public: | 15 public: |
| 16 GbmSurfaceFactory(DriWrapper* dri, | 16 GbmSurfaceFactory(); |
| 17 gbm_device* device, | |
| 18 ScreenManager* screen_manager); | |
| 19 virtual ~GbmSurfaceFactory(); | 17 virtual ~GbmSurfaceFactory(); |
| 20 | 18 |
| 19 void InitializeGpu(DriWrapper* dri, |
| 20 gbm_device* device, |
| 21 ScreenManager* screen_manager); |
| 22 |
| 21 // DriSurfaceFactory: | 23 // DriSurfaceFactory: |
| 22 virtual intptr_t GetNativeDisplay() OVERRIDE; | 24 virtual intptr_t GetNativeDisplay() OVERRIDE; |
| 23 virtual const int32_t* GetEGLSurfaceProperties( | 25 virtual const int32_t* GetEGLSurfaceProperties( |
| 24 const int32_t* desired_list) OVERRIDE; | 26 const int32_t* desired_list) OVERRIDE; |
| 25 virtual bool LoadEGLGLES2Bindings( | 27 virtual bool LoadEGLGLES2Bindings( |
| 26 AddGLLibraryCallback add_gl_library, | 28 AddGLLibraryCallback add_gl_library, |
| 27 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; | 29 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; |
| 28 virtual scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( | 30 virtual scoped_ptr<ui::SurfaceOzoneEGL> CreateEGLSurfaceForWidget( |
| 29 gfx::AcceleratedWidget w) OVERRIDE; | 31 gfx::AcceleratedWidget w) OVERRIDE; |
| 30 virtual ui::NativeBufferOzone CreateNativeBuffer( | 32 virtual ui::NativeBufferOzone CreateNativeBuffer( |
| 31 gfx::Size size, | 33 gfx::Size size, |
| 32 BufferFormat format) OVERRIDE; | 34 BufferFormat format) OVERRIDE; |
| 33 | 35 |
| 34 private: | 36 private: |
| 35 gbm_device* device_; // Not owned. | 37 gbm_device* device_; // Not owned. |
| 36 | 38 |
| 37 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); | 39 DISALLOW_COPY_AND_ASSIGN(GbmSurfaceFactory); |
| 38 }; | 40 }; |
| 39 | 41 |
| 40 } // namespace ui | 42 } // namespace ui |
| 41 | 43 |
| 42 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ | 44 #endif // UI_OZONE_PLATFORM_DRI_GBM_SURFACE_FACTORY_H_ |
| OLD | NEW |