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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 // Used to set a specific configuration to the CRTC. Normally this function | 74 // Used to set a specific configuration to the CRTC. Normally this function |
| 75 // would be called with a CRTC saved state (from |GetCrtc|) to restore it to | 75 // would be called with a CRTC saved state (from |GetCrtc|) to restore it to |
| 76 // its original configuration. | 76 // its original configuration. |
| 77 virtual bool SetCrtc(drmModeCrtc* crtc, std::vector<uint32_t> connectors); | 77 virtual bool SetCrtc(drmModeCrtc* crtc, std::vector<uint32_t> connectors); |
| 78 | 78 |
| 79 virtual bool DisableCrtc(uint32_t crtc_id); | 79 virtual bool DisableCrtc(uint32_t crtc_id); |
| 80 | 80 |
| 81 // Returns the connector properties for |connector_id|. | 81 // Returns the connector properties for |connector_id|. |
| 82 virtual ScopedDrmConnectorPtr GetConnector(uint32_t connector_id); | 82 virtual ScopedDrmConnectorPtr GetConnector(uint32_t connector_id); |
| 83 | 83 |
| 84 // Register a buffer with the CRTC. On successful registration, the CRTC will | 84 // Register a RGB buffer with the CRTC. On successful registration, the CRTC |
| 85 // will | |
|
spang
2015/10/23 17:00:50
join with next line
william.xie1
2015/10/23 22:52:19
Done.
| |
| 85 // assign a framebuffer ID to |framebuffer|. | 86 // assign a framebuffer ID to |framebuffer|. |
| 86 virtual bool AddFramebuffer(uint32_t width, | 87 virtual bool AddFramebuffer(uint32_t width, |
| 87 uint32_t height, | 88 uint32_t height, |
| 88 uint8_t depth, | 89 uint8_t depth, |
| 89 uint8_t bpp, | 90 uint8_t bpp, |
| 90 uint32_t stride, | 91 uint32_t stride, |
| 91 uint32_t handle, | 92 uint32_t handle, |
| 92 uint32_t* framebuffer); | 93 uint32_t* framebuffer); |
| 93 | 94 |
| 95 // Register any format buffer with the CRTC. On successful registration, the | |
| 96 // CRTC will | |
| 97 // assign a framebuffer ID to |framebuffer|. | |
| 98 virtual bool AddFramebuffer2(uint32_t width, | |
| 99 uint32_t height, | |
| 100 uint32_t format, | |
| 101 uint32_t handles[4], | |
| 102 uint32_t strides[4], | |
| 103 uint32_t offsets[4], | |
| 104 uint32_t* framebuffer, | |
| 105 uint32_t flags); | |
| 106 | |
| 94 // Deregister the given |framebuffer|. | 107 // Deregister the given |framebuffer|. |
| 95 virtual bool RemoveFramebuffer(uint32_t framebuffer); | 108 virtual bool RemoveFramebuffer(uint32_t framebuffer); |
| 96 | 109 |
| 97 // Get the DRM details associated with |framebuffer|. | 110 // Get the DRM details associated with |framebuffer|. |
| 98 virtual ScopedDrmFramebufferPtr GetFramebuffer(uint32_t framebuffer); | 111 virtual ScopedDrmFramebufferPtr GetFramebuffer(uint32_t framebuffer); |
| 99 | 112 |
| 100 // Schedules a pageflip for CRTC |crtc_id|. This function will return | 113 // Schedules a pageflip for CRTC |crtc_id|. This function will return |
| 101 // immediately. Upon completion of the pageflip event, the CRTC will be | 114 // immediately. Upon completion of the pageflip event, the CRTC will be |
| 102 // displaying the buffer with ID |framebuffer| and will have a DRM event | 115 // displaying the buffer with ID |framebuffer| and will have a DRM event |
| 103 // queued on |fd_|. | 116 // queued on |fd_|. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 205 scoped_refptr<PageFlipManager> page_flip_manager_; | 218 scoped_refptr<PageFlipManager> page_flip_manager_; |
| 206 | 219 |
| 207 bool is_primary_device_; | 220 bool is_primary_device_; |
| 208 | 221 |
| 209 DISALLOW_COPY_AND_ASSIGN(DrmDevice); | 222 DISALLOW_COPY_AND_ASSIGN(DrmDevice); |
| 210 }; | 223 }; |
| 211 | 224 |
| 212 } // namespace ui | 225 } // namespace ui |
| 213 | 226 |
| 214 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_ | 227 #endif // UI_OZONE_PLATFORM_DRM_GPU_DRM_DEVICE_H_ |
| OLD | NEW |