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

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

Issue 1091253003: [ozone] Keep the queue of surfaceless buffers inside gl_surface_ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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_HARDWARE_DISPLAY_CONTROLLER_H_ 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_CONTROLLER_H_
6 #define UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_CONTROLLER_H_ 6 #define UI_OZONE_PLATFORM_DRM_GPU_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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 scoped_refptr<DrmDevice> GetAllocationDrmDevice() const; 151 scoped_refptr<DrmDevice> GetAllocationDrmDevice() const;
152 152
153 private: 153 private:
154 // Returns true if any of the CRTCs is waiting for a page flip. 154 // Returns true if any of the CRTCs is waiting for a page flip.
155 bool HasPendingPageFlips() const; 155 bool HasPendingPageFlips() const;
156 156
157 bool ActualSchedulePageFlip(); 157 bool ActualSchedulePageFlip();
158 158
159 void ProcessPageFlipRequest(); 159 void ProcessPageFlipRequest();
160 160
161 void ClearPendingRequests();
162
163 // PageFlipObserver: 161 // PageFlipObserver:
164 void OnPageFlipEvent() override; 162 void OnPageFlipEvent() override;
165 163
166 struct PageFlipRequest { 164 struct PageFlipRequest {
167 PageFlipRequest(const OverlayPlaneList& planes, 165 PageFlipRequest(const OverlayPlaneList& planes,
168 bool is_sync, 166 bool is_sync,
169 const base::Closure& callback); 167 const base::Closure& callback);
170 ~PageFlipRequest(); 168 ~PageFlipRequest();
171 169
172 OverlayPlaneList planes; 170 OverlayPlaneList planes;
173 bool is_sync; 171 bool is_sync;
174 base::Closure callback; 172 base::Closure callback;
175 }; 173 };
176 174
177 // Buffers need to be declared first so that they are destroyed last. Needed 175 scoped_ptr<PageFlipRequest> page_flip_request_;
178 // since the controllers may reference the buffers.
179 OverlayPlaneList current_planes_;
180 // Planes currently being queued without having SchedulePageFlip() called.
181 OverlayPlaneList pending_planes_;
182 // Plane lists for which SchedulePageFlip() was called. They are waiting for
183 // previous page flip events to be completed before they can be serviced.
184 std::deque<PageFlipRequest> requests_;
185 scoped_refptr<ScanoutBuffer> cursor_buffer_; 176 scoped_refptr<ScanoutBuffer> cursor_buffer_;
186 177
187 base::ScopedPtrHashMap<DrmDevice*, HardwareDisplayPlaneList> 178 base::ScopedPtrHashMap<DrmDevice*, HardwareDisplayPlaneList>
188 owned_hardware_planes_; 179 owned_hardware_planes_;
189 180
190 // Stores the CRTC configuration. This is used to identify monitors and 181 // Stores the CRTC configuration. This is used to identify monitors and
191 // configure them. 182 // configure them.
192 ScopedVector<CrtcController> crtc_controllers_; 183 ScopedVector<CrtcController> crtc_controllers_;
193 184
194 // Location of the controller on the screen. 185 // Location of the controller on the screen.
195 gfx::Point origin_; 186 gfx::Point origin_;
196 187
197 // The mode used by the last modesetting operation. 188 // The mode used by the last modesetting operation.
198 drmModeModeInfo mode_; 189 drmModeModeInfo mode_;
199 190
200 bool is_disabled_; 191 bool is_disabled_;
192 bool ignore_page_flip_event_;
201 193
202 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController); 194 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController);
203 }; 195 };
204 196
205 } // namespace ui 197 } // namespace ui
206 198
207 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_CONTROLLER_H_ 199 #endif // UI_OZONE_PLATFORM_DRM_GPU_HARDWARE_DISPLAY_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698