| 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_DRI_SURFACE_FACTORY_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
| 6 #define UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ | 6 #define UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // This implementation is used in conjunction with the software rendering | 23 // This implementation is used in conjunction with the software rendering |
| 24 // path. | 24 // path. |
| 25 class DriSurfaceFactory : public ui::SurfaceFactoryOzone, | 25 class DriSurfaceFactory : public ui::SurfaceFactoryOzone, |
| 26 public HardwareCursorDelegate { | 26 public HardwareCursorDelegate { |
| 27 public: | 27 public: |
| 28 static const gfx::AcceleratedWidget kDefaultWidgetHandle; | 28 static const gfx::AcceleratedWidget kDefaultWidgetHandle; |
| 29 | 29 |
| 30 DriSurfaceFactory(DriWrapper* drm, ScreenManager* screen_manager); | 30 DriSurfaceFactory(DriWrapper* drm, ScreenManager* screen_manager); |
| 31 virtual ~DriSurfaceFactory(); | 31 virtual ~DriSurfaceFactory(); |
| 32 | 32 |
| 33 // SurfaceFactoryOzone overrides: | 33 // Describes the state of the hardware after initialization. |
| 34 virtual HardwareState InitializeHardware() OVERRIDE; | 34 enum HardwareState { |
| 35 virtual void ShutdownHardware() OVERRIDE; | 35 UNINITIALIZED, |
| 36 INITIALIZED, |
| 37 FAILED, |
| 38 }; |
| 39 |
| 40 // Open the display device. |
| 41 virtual HardwareState InitializeHardware(); |
| 42 |
| 43 // Close the display device. |
| 44 virtual void ShutdownHardware(); |
| 45 |
| 36 virtual scoped_ptr<ui::SurfaceOzoneCanvas> CreateCanvasForWidget( | 46 virtual scoped_ptr<ui::SurfaceOzoneCanvas> CreateCanvasForWidget( |
| 37 gfx::AcceleratedWidget w) OVERRIDE; | 47 gfx::AcceleratedWidget w) OVERRIDE; |
| 38 virtual bool LoadEGLGLES2Bindings( | 48 virtual bool LoadEGLGLES2Bindings( |
| 39 AddGLLibraryCallback add_gl_library, | 49 AddGLLibraryCallback add_gl_library, |
| 40 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; | 50 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; |
| 41 | 51 |
| 42 // Create a new window/surface/widget identifier. | 52 // Create a new window/surface/widget identifier. |
| 43 gfx::AcceleratedWidget GetAcceleratedWidget(); | 53 gfx::AcceleratedWidget GetAcceleratedWidget(); |
| 44 | 54 |
| 45 // Determine dimensions of a widget. | 55 // Determine dimensions of a widget. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 68 | 78 |
| 69 SkBitmap cursor_bitmap_; | 79 SkBitmap cursor_bitmap_; |
| 70 gfx::Point cursor_location_; | 80 gfx::Point cursor_location_; |
| 71 | 81 |
| 72 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); | 82 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); |
| 73 }; | 83 }; |
| 74 | 84 |
| 75 } // namespace ui | 85 } // namespace ui |
| 76 | 86 |
| 77 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ | 87 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
| OLD | NEW |