Chromium Code Reviews| 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_DEVICE_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_ |
| 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_ | 6 #define UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 // Used to set a specific configuration to the CRTC. Normally this function | 70 // Used to set a specific configuration to the CRTC. Normally this function |
| 71 // would be called with a CRTC saved state (from |GetCrtc|) to restore it to | 71 // would be called with a CRTC saved state (from |GetCrtc|) to restore it to |
| 72 // its original configuration. | 72 // its original configuration. |
| 73 virtual bool SetCrtc(drmModeCrtc* crtc, std::vector<uint32_t> connectors); | 73 virtual bool SetCrtc(drmModeCrtc* crtc, std::vector<uint32_t> connectors); |
| 74 | 74 |
| 75 virtual bool DisableCrtc(uint32_t crtc_id); | 75 virtual bool DisableCrtc(uint32_t crtc_id); |
| 76 | 76 |
| 77 // Returns the connector properties for |connector_id|. | 77 // Returns the connector properties for |connector_id|. |
| 78 virtual ScopedDrmConnectorPtr GetConnector(uint32_t connector_id); | 78 virtual ScopedDrmConnectorPtr GetConnector(uint32_t connector_id); |
| 79 | 79 |
| 80 // Register a buffer with the CRTC. On successful registration, the CRTC will | 80 // Register any format buffer with the CRTC. On successful registration, the |
|
kalyank
2015/11/06 17:30:26
Ozone Tests need fixing too i.e. MockDrmDevice etc
william.xie1
2015/11/06 18:24:02
Thanks for reminder, Kalyan, but how about creatin
spang
2015/11/06 18:29:28
Fixing tests must be done here not in a followup.
| |
| 81 // assign a framebuffer ID to |framebuffer|. | 81 // CRTC will assign a framebuffer ID to |framebuffer|. |
| 82 virtual bool AddFramebuffer(uint32_t width, | 82 virtual bool AddFramebuffer2(uint32_t width, |
| 83 uint32_t height, | 83 uint32_t height, |
| 84 uint8_t depth, | 84 uint32_t format, |
| 85 uint8_t bpp, | 85 uint32_t handles[4], |
| 86 uint32_t stride, | 86 uint32_t strides[4], |
| 87 uint32_t handle, | 87 uint32_t offsets[4], |
| 88 uint32_t* framebuffer); | 88 uint32_t* framebuffer, |
| 89 uint32_t flags); | |
| 89 | 90 |
| 90 // Deregister the given |framebuffer|. | 91 // Deregister the given |framebuffer|. |
| 91 virtual bool RemoveFramebuffer(uint32_t framebuffer); | 92 virtual bool RemoveFramebuffer(uint32_t framebuffer); |
| 92 | 93 |
| 93 // Get the DRM details associated with |framebuffer|. | 94 // Get the DRM details associated with |framebuffer|. |
| 94 virtual ScopedDrmFramebufferPtr GetFramebuffer(uint32_t framebuffer); | 95 virtual ScopedDrmFramebufferPtr GetFramebuffer(uint32_t framebuffer); |
| 95 | 96 |
| 96 // Schedules a pageflip for CRTC |crtc_id|. This function will return | 97 // Schedules a pageflip for CRTC |crtc_id|. This function will return |
| 97 // immediately. Upon completion of the pageflip event, the CRTC will be | 98 // immediately. Upon completion of the pageflip event, the CRTC will be |
| 98 // displaying the buffer with ID |framebuffer| and will have a DRM event | 99 // displaying the buffer with ID |framebuffer| and will have a DRM event |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 scoped_ptr<IOWatcher> watcher_; | 199 scoped_ptr<IOWatcher> watcher_; |
| 199 | 200 |
| 200 bool is_primary_device_; | 201 bool is_primary_device_; |
| 201 | 202 |
| 202 DISALLOW_COPY_AND_ASSIGN(DrmDevice); | 203 DISALLOW_COPY_AND_ASSIGN(DrmDevice); |
| 203 }; | 204 }; |
| 204 | 205 |
| 205 } // namespace ui | 206 } // namespace ui |
| 206 | 207 |
| 207 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_ | 208 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_ |
| OLD | NEW |