| 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_DRM_GPU_DRM_WINDOW_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 namespace gfx { | 22 namespace gfx { |
| 23 class Point; | 23 class Point; |
| 24 class Rect; | 24 class Rect; |
| 25 } // namespace gfx | 25 } // namespace gfx |
| 26 | 26 |
| 27 namespace ui { | 27 namespace ui { |
| 28 | 28 |
| 29 class DrmBuffer; | 29 class DrmBuffer; |
| 30 class DrmDeviceManager; | 30 class DrmDeviceManager; |
| 31 class HardwareDisplayController; | 31 class HardwareDisplayController; |
| 32 struct OverlayCheck_Params; |
| 33 class ScanoutBufferGenerator; |
| 32 class ScreenManager; | 34 class ScreenManager; |
| 33 | 35 |
| 34 // A delegate of the platform window (DrmWindow) on the GPU process. This is | 36 // A delegate of the platform window (DrmWindow) on the GPU process. This is |
| 35 // used to keep track of window state changes such that each platform window is | 37 // used to keep track of window state changes such that each platform window is |
| 36 // correctly associated with a display. | 38 // correctly associated with a display. |
| 37 // A window is associated with the display whose bounds contains the window | 39 // A window is associated with the display whose bounds contains the window |
| 38 // bounds. If there's no suitable display, the window is disconnected and its | 40 // bounds. If there's no suitable display, the window is disconnected and its |
| 39 // contents will not be visible. | 41 // contents will not be visible. |
| 40 class OZONE_EXPORT DrmWindow { | 42 class OZONE_EXPORT DrmWindow { |
| 41 public: | 43 public: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // Move the HW cursor to the specified location. | 79 // Move the HW cursor to the specified location. |
| 78 void MoveCursor(const gfx::Point& location); | 80 void MoveCursor(const gfx::Point& location); |
| 79 | 81 |
| 80 // Queue overlay planes and page flips. | 82 // Queue overlay planes and page flips. |
| 81 // If hardware display controller is available, forward the information | 83 // If hardware display controller is available, forward the information |
| 82 // immediately, otherwise queue up on the window and forward when the hardware | 84 // immediately, otherwise queue up on the window and forward when the hardware |
| 83 // is once again ready. | 85 // is once again ready. |
| 84 void QueueOverlayPlane(const OverlayPlane& plane); | 86 void QueueOverlayPlane(const OverlayPlane& plane); |
| 85 | 87 |
| 86 bool SchedulePageFlip(bool is_sync, const SwapCompletionCallback& callback); | 88 bool SchedulePageFlip(bool is_sync, const SwapCompletionCallback& callback); |
| 89 bool TestPageFlip(const std::vector<OverlayCheck_Params>& planes, |
| 90 ScanoutBufferGenerator* buffer_generator); |
| 87 | 91 |
| 88 // Returns the last buffer associated with this window. | 92 // Returns the last buffer associated with this window. |
| 89 const OverlayPlane* GetLastModesetBuffer(); | 93 const OverlayPlane* GetLastModesetBuffer(); |
| 90 | 94 |
| 91 private: | 95 private: |
| 92 // Draw the last set cursor & update the cursor plane. | 96 // Draw the last set cursor & update the cursor plane. |
| 93 void ResetCursor(bool bitmap_only); | 97 void ResetCursor(bool bitmap_only); |
| 94 | 98 |
| 95 // Draw next frame in an animated cursor. | 99 // Draw next frame in an animated cursor. |
| 96 void OnCursorAnimationTimeout(); | 100 void OnCursorAnimationTimeout(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 126 OverlayPlaneList pending_planes_; | 130 OverlayPlaneList pending_planes_; |
| 127 OverlayPlaneList last_submitted_planes_; | 131 OverlayPlaneList last_submitted_planes_; |
| 128 bool last_swap_sync_; | 132 bool last_swap_sync_; |
| 129 | 133 |
| 130 DISALLOW_COPY_AND_ASSIGN(DrmWindow); | 134 DISALLOW_COPY_AND_ASSIGN(DrmWindow); |
| 131 }; | 135 }; |
| 132 | 136 |
| 133 } // namespace ui | 137 } // namespace ui |
| 134 | 138 |
| 135 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_ | 139 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_ |
| OLD | NEW |