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_WINDOW_DELEGATE_IMPL_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ |
6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ | 6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
10 #include "ui/gfx/geometry/point.h" | 10 #include "ui/gfx/geometry/point.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 gfx::AcceleratedWidget GetAcceleratedWidget() override; | 37 gfx::AcceleratedWidget GetAcceleratedWidget() override; |
38 HardwareDisplayController* GetController() override; | 38 HardwareDisplayController* GetController() override; |
39 void OnBoundsChanged(const gfx::Rect& bounds) override; | 39 void OnBoundsChanged(const gfx::Rect& bounds) override; |
40 void SetCursor(const std::vector<SkBitmap>& bitmaps, | 40 void SetCursor(const std::vector<SkBitmap>& bitmaps, |
41 const gfx::Point& location, | 41 const gfx::Point& location, |
42 int frame_delay_ms) override; | 42 int frame_delay_ms) override; |
43 void MoveCursor(const gfx::Point& location) override; | 43 void MoveCursor(const gfx::Point& location) override; |
44 | 44 |
45 private: | 45 private: |
46 // Draw the last set cursor & update the cursor plane. | 46 // Draw the last set cursor & update the cursor plane. |
47 void ResetCursor(); | 47 void ResetCursor(bool bitmap_only); |
48 | 48 |
49 // Draw next frame in an animated cursor. | 49 // Draw next frame in an animated cursor. |
50 void OnCursorAnimationTimeout(); | 50 void OnCursorAnimationTimeout(); |
51 | 51 |
52 gfx::AcceleratedWidget widget_; | 52 gfx::AcceleratedWidget widget_; |
53 | 53 |
54 DriWrapper* drm_; // Not owned. | 54 DriWrapper* drm_; // Not owned. |
55 DriWindowDelegateManager* window_manager_; // Not owned. | 55 DriWindowDelegateManager* window_manager_; // Not owned. |
56 ScreenManager* screen_manager_; // Not owned. | 56 ScreenManager* screen_manager_; // Not owned. |
57 | 57 |
58 base::WeakPtr<HardwareDisplayController> controller_; | 58 base::WeakPtr<HardwareDisplayController> controller_; |
59 | 59 |
60 base::RepeatingTimer<DriWindowDelegateImpl> cursor_timer_; | 60 base::RepeatingTimer<DriWindowDelegateImpl> cursor_timer_; |
61 | 61 |
62 scoped_refptr<DriBuffer> cursor_buffers_[2]; | 62 scoped_refptr<DriBuffer> cursor_buffers_[2]; |
63 int cursor_frontbuffer_; | 63 int cursor_frontbuffer_; |
64 | 64 |
65 std::vector<SkBitmap> cursor_bitmaps_; | 65 std::vector<SkBitmap> cursor_bitmaps_; |
66 gfx::Point cursor_location_; | 66 gfx::Point cursor_location_; |
67 int cursor_frame_; | 67 int cursor_frame_; |
68 int cursor_frame_delay_ms_; | 68 int cursor_frame_delay_ms_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(DriWindowDelegateImpl); | 70 DISALLOW_COPY_AND_ASSIGN(DriWindowDelegateImpl); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace ui | 73 } // namespace ui |
74 | 74 |
75 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ | 75 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ |
OLD | NEW |