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

Side by Side Diff: ui/ozone/platform/dri/hardware_display_controller.h

Issue 960273003: ozone: dri: add synchronous SwapBuffers support on surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after dnicoara's review Created 5 years, 9 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_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_
6 #define UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ 6 #define UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <xf86drmMode.h> 10 #include <xf86drmMode.h>
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // 116 //
117 // Between this call and the callback, the framebuffers used in this call 117 // Between this call and the callback, the framebuffers used in this call
118 // should not be modified in any way as it would cause screen tearing if the 118 // should not be modified in any way as it would cause screen tearing if the
119 // hardware performed the flip. Note that the frontbuffer should also not 119 // hardware performed the flip. Note that the frontbuffer should also not
120 // be modified as it could still be displayed. 120 // be modified as it could still be displayed.
121 // 121 //
122 // Note that this function does not block. Also, this function should not be 122 // Note that this function does not block. Also, this function should not be
123 // called again before the page flip occurrs. 123 // called again before the page flip occurrs.
124 // 124 //
125 // Returns true if the page flip was successfully registered, false otherwise. 125 // Returns true if the page flip was successfully registered, false otherwise.
126 bool SchedulePageFlip(const base::Closure& callback); 126 bool SchedulePageFlip(bool is_sync, const base::Closure& callback);
127 127
128 // Set the hardware cursor to show the contents of |surface|. 128 // Set the hardware cursor to show the contents of |surface|.
129 bool SetCursor(const scoped_refptr<ScanoutBuffer>& buffer); 129 bool SetCursor(const scoped_refptr<ScanoutBuffer>& buffer);
130 130
131 bool UnsetCursor(); 131 bool UnsetCursor();
132 132
133 // Moves the hardware cursor to |location|. 133 // Moves the hardware cursor to |location|.
134 bool MoveCursor(const gfx::Point& location); 134 bool MoveCursor(const gfx::Point& location);
135 135
136 void AddCrtc(scoped_ptr<CrtcController> controller); 136 void AddCrtc(scoped_ptr<CrtcController> controller);
(...skipping 14 matching lines...) Expand all
151 const std::vector<CrtcController*>& crtc_controllers() const { 151 const std::vector<CrtcController*>& crtc_controllers() const {
152 return crtc_controllers_.get(); 152 return crtc_controllers_.get();
153 } 153 }
154 154
155 scoped_refptr<DriWrapper> GetAllocationDriWrapper() const; 155 scoped_refptr<DriWrapper> GetAllocationDriWrapper() const;
156 156
157 private: 157 private:
158 // Returns true if any of the CRTCs is waiting for a page flip. 158 // Returns true if any of the CRTCs is waiting for a page flip.
159 bool HasPendingPageFlips() const; 159 bool HasPendingPageFlips() const;
160 160
161 bool ActualSchedulePageFlip(); 161 bool ActualSchedulePageFlip(bool is_sync);
162 162
163 void ProcessPageFlipRequest(); 163 void ProcessPageFlipRequest();
164 164
165 void ClearPendingRequests(); 165 void ClearPendingRequests();
166 166
167 // PageFlipObserver: 167 // PageFlipObserver:
168 void OnPageFlipEvent() override; 168 void OnPageFlipEvent() override;
169 169
170 struct PageFlipRequest { 170 struct PageFlipRequest {
171 PageFlipRequest(const OverlayPlaneList& planes, 171 PageFlipRequest(const OverlayPlaneList& planes,
(...skipping 25 matching lines...) Expand all
197 drmModeModeInfo mode_; 197 drmModeModeInfo mode_;
198 198
199 bool is_disabled_; 199 bool is_disabled_;
200 200
201 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController); 201 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController);
202 }; 202 };
203 203
204 } // namespace ui 204 } // namespace ui
205 205
206 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ 206 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698