| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 class OZONE_EXPORT DrmWindow { | 49 class OZONE_EXPORT DrmWindow { |
| 50 public: | 50 public: |
| 51 DrmWindow(gfx::AcceleratedWidget widget, | 51 DrmWindow(gfx::AcceleratedWidget widget, |
| 52 DrmDeviceManager* device_manager, | 52 DrmDeviceManager* device_manager, |
| 53 ScreenManager* screen_manager); | 53 ScreenManager* screen_manager); |
| 54 | 54 |
| 55 ~DrmWindow(); | 55 ~DrmWindow(); |
| 56 | 56 |
| 57 gfx::Rect bounds() const { return bounds_; } | 57 gfx::Rect bounds() const { return bounds_; } |
| 58 | 58 |
| 59 void Initialize(); | 59 void Initialize(ScanoutBufferGenerator* buffer_generator); |
| 60 | 60 |
| 61 void Shutdown(); | 61 void Shutdown(); |
| 62 | 62 |
| 63 // Returns the accelerated widget associated with the window. | 63 // Returns the accelerated widget associated with the window. |
| 64 gfx::AcceleratedWidget GetAcceleratedWidget(); | 64 gfx::AcceleratedWidget GetAcceleratedWidget(); |
| 65 | 65 |
| 66 // Returns the current controller the window is displaying on. Callers should | 66 // Returns the current controller the window is displaying on. Callers should |
| 67 // not cache the result as the controller may change as the window is moved. | 67 // not cache the result as the controller may change as the window is moved. |
| 68 HardwareDisplayController* GetController(); | 68 HardwareDisplayController* GetController(); |
| 69 | 69 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 82 // the bitmap is empty, the cursor is hidden. | 82 // the bitmap is empty, the cursor is hidden. |
| 83 void SetCursorWithoutAnimations(const std::vector<SkBitmap>& bitmaps, | 83 void SetCursorWithoutAnimations(const std::vector<SkBitmap>& bitmaps, |
| 84 const gfx::Point& location); | 84 const gfx::Point& location); |
| 85 | 85 |
| 86 // Move the HW cursor to the specified location. | 86 // Move the HW cursor to the specified location. |
| 87 void MoveCursor(const gfx::Point& location); | 87 void MoveCursor(const gfx::Point& location); |
| 88 | 88 |
| 89 void SchedulePageFlip(const std::vector<OverlayPlane>& planes, | 89 void SchedulePageFlip(const std::vector<OverlayPlane>& planes, |
| 90 const SwapCompletionCallback& callback); | 90 const SwapCompletionCallback& callback); |
| 91 std::vector<OverlayCheck_Params> TestPageFlip( | 91 std::vector<OverlayCheck_Params> TestPageFlip( |
| 92 const std::vector<OverlayCheck_Params>& overlay_params, | 92 const std::vector<OverlayCheck_Params>& overlay_params); |
| 93 ScanoutBufferGenerator* buffer_generator); | |
| 94 | 93 |
| 95 // Returns the last buffer associated with this window. | 94 // Returns the last buffer associated with this window. |
| 96 const OverlayPlane* GetLastModesetBuffer(); | 95 const OverlayPlane* GetLastModesetBuffer(); |
| 97 | 96 |
| 98 void GetVSyncParameters( | 97 void GetVSyncParameters( |
| 99 const gfx::VSyncProvider::UpdateVSyncCallback& callback) const; | 98 const gfx::VSyncProvider::UpdateVSyncCallback& callback) const; |
| 100 | 99 |
| 101 private: | 100 private: |
| 102 // Draw the last set cursor & update the cursor plane. | 101 // Draw the last set cursor & update the cursor plane. |
| 103 void ResetCursor(bool bitmap_only); | 102 void ResetCursor(bool bitmap_only); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 OverlayPlaneList last_submitted_planes_; | 134 OverlayPlaneList last_submitted_planes_; |
| 136 | 135 |
| 137 bool force_buffer_reallocation_ = false; | 136 bool force_buffer_reallocation_ = false; |
| 138 | 137 |
| 139 DISALLOW_COPY_AND_ASSIGN(DrmWindow); | 138 DISALLOW_COPY_AND_ASSIGN(DrmWindow); |
| 140 }; | 139 }; |
| 141 | 140 |
| 142 } // namespace ui | 141 } // namespace ui |
| 143 | 142 |
| 144 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_ | 143 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_ |
| OLD | NEW |