Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(689)

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_window.h

Issue 1311043016: Switch DRM platform to using a separate thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mv-drm-calls-on-thread2
Patch Set: . Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 10 matching lines...) Expand all
21 class SkBitmap; 21 class SkBitmap;
22 22
23 namespace gfx { 23 namespace gfx {
24 class Point; 24 class Point;
25 class Rect; 25 class Rect;
26 } // namespace gfx 26 } // namespace gfx
27 27
28 namespace ui { 28 namespace ui {
29 29
30 class DrmBuffer; 30 class DrmBuffer;
31 class DrmDevice;
31 class DrmDeviceManager; 32 class DrmDeviceManager;
32 class HardwareDisplayController; 33 class HardwareDisplayController;
33 struct OverlayCheck_Params; 34 struct OverlayCheck_Params;
34 class ScanoutBufferGenerator; 35 class ScanoutBufferGenerator;
35 class ScreenManager; 36 class ScreenManager;
36 37
37 // The GPU object representing a window. 38 // The GPU object representing a window.
38 // 39 //
39 // The main purpose of this object is to associate drawing surfaces with 40 // The main purpose of this object is to associate drawing surfaces with
40 // displays. A surface created with the same id as the window (from 41 // displays. A surface created with the same id as the window (from
41 // GetAcceleratedWidget()) will paint onto that window. A window with 42 // GetAcceleratedWidget()) will paint onto that window. A window with
42 // the same bounds as a display will paint onto that display. 43 // the same bounds as a display will paint onto that display.
43 // 44 //
44 // If there's no display whose bounds match the window's, the window is 45 // If there's no display whose bounds match the window's, the window is
45 // disconnected and its contents will not be visible to the user. 46 // disconnected and its contents will not be visible to the user.
46 class OZONE_EXPORT DrmWindow { 47 class OZONE_EXPORT DrmWindow : public base::SupportsWeakPtr<DrmWindow> {
47 public: 48 public:
48 DrmWindow(gfx::AcceleratedWidget widget, 49 DrmWindow(gfx::AcceleratedWidget widget,
49 DrmDeviceManager* device_manager, 50 DrmDeviceManager* device_manager,
50 ScreenManager* screen_manager); 51 ScreenManager* screen_manager);
51 52
52 ~DrmWindow(); 53 ~DrmWindow();
53 54
54 gfx::Rect bounds() const { return bounds_; } 55 gfx::Rect bounds() const { return bounds_; }
55 56
56 void Initialize(); 57 void Initialize();
(...skipping 25 matching lines...) Expand all
82 83
83 // Move the HW cursor to the specified location. 84 // Move the HW cursor to the specified location.
84 void MoveCursor(const gfx::Point& location); 85 void MoveCursor(const gfx::Point& location);
85 86
86 // Queue overlay planes and page flips. 87 // Queue overlay planes and page flips.
87 // If hardware display controller is available, forward the information 88 // If hardware display controller is available, forward the information
88 // immediately, otherwise queue up on the window and forward when the hardware 89 // immediately, otherwise queue up on the window and forward when the hardware
89 // is once again ready. 90 // is once again ready.
90 void QueueOverlayPlane(const OverlayPlane& plane); 91 void QueueOverlayPlane(const OverlayPlane& plane);
91 92
92 bool SchedulePageFlip(const SwapCompletionCallback& callback); 93 void SchedulePageFlip(const SwapCompletionCallback& callback);
93 bool TestPageFlip(const std::vector<OverlayCheck_Params>& planes, 94 bool TestPageFlip(const std::vector<OverlayCheck_Params>& planes,
94 ScanoutBufferGenerator* buffer_generator); 95 ScanoutBufferGenerator* buffer_generator);
95 96
96 // Returns the last buffer associated with this window. 97 // Returns the last buffer associated with this window.
97 const OverlayPlane* GetLastModesetBuffer(); 98 const OverlayPlane* GetLastModesetBuffer();
98 99
99 void GetVSyncParameters( 100 void GetVSyncParameters(
100 const gfx::VSyncProvider::UpdateVSyncCallback& callback) const; 101 const gfx::VSyncProvider::UpdateVSyncCallback& callback) const;
101 102
102 private: 103 private:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 OverlayPlaneList last_submitted_planes_; 139 OverlayPlaneList last_submitted_planes_;
139 140
140 bool force_buffer_reallocation_ = false; 141 bool force_buffer_reallocation_ = false;
141 142
142 DISALLOW_COPY_AND_ASSIGN(DrmWindow); 143 DISALLOW_COPY_AND_ASSIGN(DrmWindow);
143 }; 144 };
144 145
145 } // namespace ui 146 } // namespace ui
146 147
147 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_ 148 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698