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 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 }; | 43 }; |
44 | 44 |
45 // Open the display device. | 45 // Open the display device. |
46 HardwareState InitializeHardware(); | 46 HardwareState InitializeHardware(); |
47 | 47 |
48 // Close the display device. | 48 // Close the display device. |
49 void ShutdownHardware(); | 49 void ShutdownHardware(); |
50 | 50 |
51 // SurfaceFactoryOzone: | 51 // SurfaceFactoryOzone: |
52 virtual scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( | 52 virtual scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( |
53 gfx::AcceleratedWidget widget) OVERRIDE; | 53 gfx::AcceleratedWidget widget) override; |
54 virtual bool LoadEGLGLES2Bindings( | 54 virtual bool LoadEGLGLES2Bindings( |
55 AddGLLibraryCallback add_gl_library, | 55 AddGLLibraryCallback add_gl_library, |
56 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; | 56 SetGLGetProcAddressProcCallback set_gl_get_proc_address) override; |
57 | 57 |
58 // HardwareCursorDelegate: | 58 // HardwareCursorDelegate: |
59 virtual void SetHardwareCursor(gfx::AcceleratedWidget widget, | 59 virtual void SetHardwareCursor(gfx::AcceleratedWidget widget, |
60 const std::vector<SkBitmap>& bitmaps, | 60 const std::vector<SkBitmap>& bitmaps, |
61 const gfx::Point& location, | 61 const gfx::Point& location, |
62 int frame_delay_ms) OVERRIDE; | 62 int frame_delay_ms) override; |
63 virtual void MoveHardwareCursor(gfx::AcceleratedWidget window, | 63 virtual void MoveHardwareCursor(gfx::AcceleratedWidget window, |
64 const gfx::Point& location) OVERRIDE; | 64 const gfx::Point& location) override; |
65 | 65 |
66 protected: | 66 protected: |
67 // Draw the last set cursor & update the cursor plane. | 67 // Draw the last set cursor & update the cursor plane. |
68 void ResetCursor(); | 68 void ResetCursor(); |
69 | 69 |
70 // Draw next frame in an animated cursor. | 70 // Draw next frame in an animated cursor. |
71 void OnCursorAnimationTimeout(); | 71 void OnCursorAnimationTimeout(); |
72 | 72 |
73 DriWrapper* drm_; // Not owned. | 73 DriWrapper* drm_; // Not owned. |
74 ScreenManager* screen_manager_; // Not owned. | 74 ScreenManager* screen_manager_; // Not owned. |
75 DriWindowDelegateManager* window_manager_; // Not owned. | 75 DriWindowDelegateManager* window_manager_; // Not owned. |
76 HardwareState state_; | 76 HardwareState state_; |
77 | 77 |
78 scoped_refptr<DriBuffer> cursor_buffers_[2]; | 78 scoped_refptr<DriBuffer> cursor_buffers_[2]; |
79 int cursor_frontbuffer_; | 79 int cursor_frontbuffer_; |
80 | 80 |
81 gfx::AcceleratedWidget cursor_widget_; | 81 gfx::AcceleratedWidget cursor_widget_; |
82 std::vector<SkBitmap> cursor_bitmaps_; | 82 std::vector<SkBitmap> cursor_bitmaps_; |
83 gfx::Point cursor_location_; | 83 gfx::Point cursor_location_; |
84 int cursor_frame_; | 84 int cursor_frame_; |
85 int cursor_frame_delay_ms_; | 85 int cursor_frame_delay_ms_; |
86 base::RepeatingTimer<DriSurfaceFactory> cursor_timer_; | 86 base::RepeatingTimer<DriSurfaceFactory> cursor_timer_; |
87 | 87 |
88 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); | 88 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); |
89 }; | 89 }; |
90 | 90 |
91 } // namespace ui | 91 } // namespace ui |
92 | 92 |
93 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ | 93 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
OLD | NEW |