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" |
11 #include "ui/gfx/geometry/point.h" | 11 #include "ui/gfx/geometry/point.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
14 #include "ui/gfx/swap_result.h" | |
14 #include "ui/ozone/ozone_export.h" | 15 #include "ui/ozone/ozone_export.h" |
15 #include "ui/ozone/platform/drm/gpu/overlay_plane.h" | 16 #include "ui/ozone/platform/drm/gpu/overlay_plane.h" |
17 #include "ui/ozone/public/surface_ozone_egl.h" | |
16 | 18 |
17 class SkBitmap; | 19 class SkBitmap; |
18 | 20 |
19 namespace gfx { | 21 namespace gfx { |
20 class Point; | 22 class Point; |
21 class Rect; | 23 class Rect; |
22 } // namespace gfx | 24 } // namespace gfx |
23 | 25 |
24 namespace ui { | 26 namespace ui { |
25 | 27 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 const gfx::Point& location); | 74 const gfx::Point& location); |
73 | 75 |
74 // Move the HW cursor to the specified location. | 76 // Move the HW cursor to the specified location. |
75 void MoveCursor(const gfx::Point& location); | 77 void MoveCursor(const gfx::Point& location); |
76 | 78 |
77 // Queue overlay planes and page flips. | 79 // Queue overlay planes and page flips. |
78 // If hardware display controller is available, forward the information | 80 // If hardware display controller is available, forward the information |
79 // immediately, otherwise queue up on the window and forward when the hardware | 81 // immediately, otherwise queue up on the window and forward when the hardware |
80 // is once again ready. | 82 // is once again ready. |
81 void QueueOverlayPlane(const OverlayPlane& plane); | 83 void QueueOverlayPlane(const OverlayPlane& plane); |
82 bool SchedulePageFlip(bool is_sync, const base::Closure& callback); | 84 |
85 typedef SurfaceOzoneEGL::SwapCompletionCallback SwapCompletionCallback; | |
dnicoara
2015/05/08 15:15:41
Style guide says typedefs and constants should be
achaulk
2015/05/14 18:15:46
Done.
| |
86 bool SchedulePageFlip(bool is_sync, const SwapCompletionCallback& callback); | |
83 | 87 |
84 // Returns the last buffer associated with this window. | 88 // Returns the last buffer associated with this window. |
85 const OverlayPlane* GetLastModesetBuffer(); | 89 const OverlayPlane* GetLastModesetBuffer(); |
86 | 90 |
87 private: | 91 private: |
88 // Draw the last set cursor & update the cursor plane. | 92 // Draw the last set cursor & update the cursor plane. |
89 void ResetCursor(bool bitmap_only); | 93 void ResetCursor(bool bitmap_only); |
90 | 94 |
91 // Draw next frame in an animated cursor. | 95 // Draw next frame in an animated cursor. |
92 void OnCursorAnimationTimeout(); | 96 void OnCursorAnimationTimeout(); |
(...skipping 29 matching lines...) Expand all Loading... | |
122 OverlayPlaneList pending_planes_; | 126 OverlayPlaneList pending_planes_; |
123 OverlayPlaneList last_submitted_planes_; | 127 OverlayPlaneList last_submitted_planes_; |
124 bool last_swap_sync_; | 128 bool last_swap_sync_; |
125 | 129 |
126 DISALLOW_COPY_AND_ASSIGN(DrmWindow); | 130 DISALLOW_COPY_AND_ASSIGN(DrmWindow); |
127 }; | 131 }; |
128 | 132 |
129 } // namespace ui | 133 } // namespace ui |
130 | 134 |
131 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_ | 135 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_ |
OLD | NEW |