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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 void ShutdownHardware(); | 47 void ShutdownHardware(); |
48 | 48 |
49 // SurfaceFactoryOzone: | 49 // SurfaceFactoryOzone: |
50 virtual scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( | 50 virtual scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( |
51 gfx::AcceleratedWidget widget) OVERRIDE; | 51 gfx::AcceleratedWidget widget) OVERRIDE; |
52 virtual bool LoadEGLGLES2Bindings( | 52 virtual bool LoadEGLGLES2Bindings( |
53 AddGLLibraryCallback add_gl_library, | 53 AddGLLibraryCallback add_gl_library, |
54 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; | 54 SetGLGetProcAddressProcCallback set_gl_get_proc_address) OVERRIDE; |
55 | 55 |
56 // HardwareCursorDelegate: | 56 // HardwareCursorDelegate: |
57 virtual void SetHardwareCursor(gfx::AcceleratedWidget window, | 57 virtual void SetHardwareCursor(gfx::AcceleratedWidget widget, |
58 const SkBitmap& image, | 58 const std::vector<SkBitmap>& bitmaps, |
59 const gfx::Point& location) OVERRIDE; | 59 const gfx::Point& location, |
| 60 int frame_delay_ms) OVERRIDE; |
60 virtual void MoveHardwareCursor(gfx::AcceleratedWidget window, | 61 virtual void MoveHardwareCursor(gfx::AcceleratedWidget window, |
61 const gfx::Point& location) OVERRIDE; | 62 const gfx::Point& location) OVERRIDE; |
62 | 63 |
63 protected: | 64 protected: |
64 // Draw the last set cursor & update the cursor plane. | 65 // Draw the last set cursor & update the cursor plane. |
65 void ResetCursor(gfx::AcceleratedWidget w); | 66 void ResetCursor(gfx::AcceleratedWidget w); |
66 | 67 |
67 DriWrapper* drm_; // Not owned. | 68 DriWrapper* drm_; // Not owned. |
68 ScreenManager* screen_manager_; // Not owned. | 69 ScreenManager* screen_manager_; // Not owned. |
69 DriWindowManager* window_manager_; // Not owned. | 70 DriWindowManager* window_manager_; // Not owned. |
70 HardwareState state_; | 71 HardwareState state_; |
71 | 72 |
72 scoped_refptr<DriBuffer> cursor_buffers_[2]; | 73 scoped_refptr<DriBuffer> cursor_buffers_[2]; |
73 int cursor_frontbuffer_; | 74 int cursor_frontbuffer_; |
74 | 75 |
75 SkBitmap cursor_bitmap_; | 76 std::vector<SkBitmap> cursor_bitmaps_; |
76 gfx::Point cursor_location_; | 77 gfx::Point cursor_location_; |
| 78 int cursor_frame_delay_ms_; |
77 | 79 |
78 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); | 80 DISALLOW_COPY_AND_ASSIGN(DriSurfaceFactory); |
79 }; | 81 }; |
80 | 82 |
81 } // namespace ui | 83 } // namespace ui |
82 | 84 |
83 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ | 85 #endif // UI_OZONE_PLATFORM_DRI_DRI_SURFACE_FACTORY_H_ |
OLD | NEW |