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

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

Issue 469343003: [Ozone-GBM] Pumb DriWindowDelegate throughout the platform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 6 years, 4 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 | Annotate | Revision Log
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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 bool SetCursor(scoped_refptr<ScanoutBuffer> buffer); 158 bool SetCursor(scoped_refptr<ScanoutBuffer> buffer);
159 159
160 bool UnsetCursor(); 160 bool UnsetCursor();
161 161
162 // Moves the hardware cursor to |location|. 162 // Moves the hardware cursor to |location|.
163 bool MoveCursor(const gfx::Point& location); 163 bool MoveCursor(const gfx::Point& location);
164 164
165 void AddCrtc(scoped_ptr<CrtcState> state); 165 void AddCrtc(scoped_ptr<CrtcState> state);
166 scoped_ptr<CrtcState> RemoveCrtc(uint32_t crtc); 166 scoped_ptr<CrtcState> RemoveCrtc(uint32_t crtc);
167 bool HasCrtc(uint32_t crtc) const; 167 bool HasCrtc(uint32_t crtc) const;
168 bool HasCrtcs() const; 168 bool IsMirrored() const;
169 void RemoveMirroredCrtcs(); 169 bool IsDisabled() const;
170 170
171 gfx::Point origin() const { return origin_; } 171 gfx::Point origin() const { return origin_; }
172 void set_origin(const gfx::Point& origin) { origin_ = origin; } 172 void set_origin(const gfx::Point& origin) { origin_ = origin; }
173 173
174 const drmModeModeInfo& get_mode() const { return mode_; }; 174 const drmModeModeInfo& get_mode() const { return mode_; };
175 uint64_t get_time_of_last_flip() const { 175 uint64_t get_time_of_last_flip() const {
176 return time_of_last_flip_; 176 return time_of_last_flip_;
177 }; 177 };
178 178
179 private: 179 private:
(...skipping 12 matching lines...) Expand all
192 192
193 // Object containing the connection to the graphics device and wraps the API 193 // Object containing the connection to the graphics device and wraps the API
194 // calls to control it. 194 // calls to control it.
195 DriWrapper* drm_; 195 DriWrapper* drm_;
196 196
197 // Stores the CRTC configuration. This is used to identify monitors and 197 // Stores the CRTC configuration. This is used to identify monitors and
198 // configure them. 198 // configure them.
199 ScopedVector<CrtcState> crtc_states_; 199 ScopedVector<CrtcState> crtc_states_;
200 gfx::Point origin_; 200 gfx::Point origin_;
201 drmModeModeInfo mode_; 201 drmModeModeInfo mode_;
202 bool is_disabled_;
202 uint64_t time_of_last_flip_; 203 uint64_t time_of_last_flip_;
203 204
204 // Keeps track of the number of page flips scheduled but not yet serviced (in 205 // Keeps track of the number of page flips scheduled but not yet serviced (in
205 // mirror mode each CRTC schedules its own page flip event). This value is 206 // mirror mode each CRTC schedules its own page flip event). This value is
206 // changed as follows: 207 // changed as follows:
207 // 1) incremented when a successful SchedulePageFlipOnController() occurrs, 208 // 1) incremented when a successful SchedulePageFlipOnController() occurrs,
208 // 2) decremented when the page flip callback is triggered, 209 // 2) decremented when the page flip callback is triggered,
209 // 3) reset to 0 when a drmModeSetCrtc is called (via the DriWrapper). 210 // 3) reset to 0 when a drmModeSetCrtc is called (via the DriWrapper).
210 uint32_t pending_page_flips_; 211 uint32_t pending_page_flips_;
211 212
212 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController); 213 DISALLOW_COPY_AND_ASSIGN(HardwareDisplayController);
213 }; 214 };
214 215
215 } // namespace ui 216 } // namespace ui
216 217
217 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_ 218 #endif // UI_OZONE_PLATFORM_DRI_HARDWARE_DISPLAY_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698