| 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/timer/timer.h" | 8 #include "base/timer/timer.h" |
| 9 #include "ui/gfx/geometry/point.h" | 9 #include "ui/gfx/geometry/point.h" |
| 10 #include "ui/gfx/geometry/rect.h" | 10 #include "ui/gfx/geometry/rect.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 private: | 48 private: |
| 49 // Draw the last set cursor & update the cursor plane. | 49 // Draw the last set cursor & update the cursor plane. |
| 50 void ResetCursor(bool bitmap_only); | 50 void ResetCursor(bool bitmap_only); |
| 51 | 51 |
| 52 // Draw next frame in an animated cursor. | 52 // Draw next frame in an animated cursor. |
| 53 void OnCursorAnimationTimeout(); | 53 void OnCursorAnimationTimeout(); |
| 54 | 54 |
| 55 void UpdateWidgetToDrmDeviceMapping(); | 55 void UpdateWidgetToDrmDeviceMapping(); |
| 56 | 56 |
| 57 // When |controller_| changes this is called to reallocate the cursor buffers |
| 58 // since the allocation DRM device may have changed. |
| 59 void UpdateCursorBuffers(); |
| 60 |
| 57 gfx::AcceleratedWidget widget_; | 61 gfx::AcceleratedWidget widget_; |
| 58 | 62 |
| 59 DrmDeviceManager* device_manager_; // Not owned. | 63 DrmDeviceManager* device_manager_; // Not owned. |
| 60 ScreenManager* screen_manager_; // Not owned. | 64 ScreenManager* screen_manager_; // Not owned. |
| 61 | 65 |
| 62 // The current bounds of the window. | 66 // The current bounds of the window. |
| 63 gfx::Rect bounds_; | 67 gfx::Rect bounds_; |
| 64 | 68 |
| 65 // The controller associated with the current window. This may be nullptr if | 69 // The controller associated with the current window. This may be nullptr if |
| 66 // the window isn't over an active display. | 70 // the window isn't over an active display. |
| 67 HardwareDisplayController* controller_; | 71 HardwareDisplayController* controller_; |
| 68 | 72 |
| 69 base::RepeatingTimer<DriWindowDelegateImpl> cursor_timer_; | 73 base::RepeatingTimer<DriWindowDelegateImpl> cursor_timer_; |
| 70 | 74 |
| 71 scoped_refptr<DriBuffer> cursor_buffers_[2]; | 75 scoped_refptr<DriBuffer> cursor_buffers_[2]; |
| 72 int cursor_frontbuffer_; | 76 int cursor_frontbuffer_; |
| 73 | 77 |
| 74 std::vector<SkBitmap> cursor_bitmaps_; | 78 std::vector<SkBitmap> cursor_bitmaps_; |
| 75 gfx::Point cursor_location_; | 79 gfx::Point cursor_location_; |
| 76 int cursor_frame_; | 80 int cursor_frame_; |
| 77 int cursor_frame_delay_ms_; | 81 int cursor_frame_delay_ms_; |
| 78 | 82 |
| 79 DISALLOW_COPY_AND_ASSIGN(DriWindowDelegateImpl); | 83 DISALLOW_COPY_AND_ASSIGN(DriWindowDelegateImpl); |
| 80 }; | 84 }; |
| 81 | 85 |
| 82 } // namespace ui | 86 } // namespace ui |
| 83 | 87 |
| 84 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ | 88 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_DELEGATE_IMPL_H_ |
| OLD | NEW |