Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ | 5 #ifndef CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ |
| 6 #define CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ | 6 #define CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ |
| 7 | 7 |
| 8 #include "base/files/scoped_file.h" | 8 #include "base/files/scoped_file.h" |
| 9 | 9 |
| 10 namespace chromeos { | 10 namespace chromeos { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 115 virtual void BindSharedMemory(PortType port, | 115 virtual void BindSharedMemory(PortType port, |
| 116 uint32_t index, | 116 uint32_t index, |
| 117 base::ScopedFD ashmem_fd, | 117 base::ScopedFD ashmem_fd, |
| 118 off_t offset, | 118 off_t offset, |
| 119 size_t length) = 0; | 119 size_t length) = 0; |
| 120 | 120 |
| 121 // Assigns a buffer to be used for the accelerator at the specified | 121 // Assigns a buffer to be used for the accelerator at the specified |
| 122 // port and index. A buffer must be successfully bound before it can be | 122 // port and index. A buffer must be successfully bound before it can be |
| 123 // passed to the accelerator via UseBuffer(). Already bound buffers may be | 123 // passed to the accelerator via UseBuffer(). Already bound buffers may be |
| 124 // reused multiple times without additional bindings. | 124 // reused multiple times without additional bindings. |
| 125 virtual void BindDmabuf(PortType port, | 125 virtual void BindDmabuf(PortType port, |
|
Pawel Osciak
2016/05/09 07:34:53
Please add documentation for stride (esp. units).
Owen Lin
2016/05/11 01:39:59
Done.
| |
| 126 uint32_t index, | 126 uint32_t index, |
| 127 base::ScopedFD dmabuf_fd) = 0; | 127 base::ScopedFD dmabuf_fd, |
| 128 int32_t stride) = 0; | |
| 128 | 129 |
| 129 // Passes a buffer to the accelerator. For input buffer, the accelerator | 130 // Passes a buffer to the accelerator. For input buffer, the accelerator |
| 130 // will process it. For output buffer, the accelerator will output content | 131 // will process it. For output buffer, the accelerator will output content |
| 131 // to it. | 132 // to it. |
| 132 virtual void UseBuffer(PortType port, | 133 virtual void UseBuffer(PortType port, |
| 133 uint32_t index, | 134 uint32_t index, |
| 134 const BufferMetadata& metadata) = 0; | 135 const BufferMetadata& metadata) = 0; |
| 135 | 136 |
| 136 // Sets the number of output buffers. When it fails, Client::OnError() will | 137 // Sets the number of output buffers. When it fails, Client::OnError() will |
| 137 // be called. | 138 // be called. |
| 138 virtual void SetNumberOfOutputBuffers(size_t number) = 0; | 139 virtual void SetNumberOfOutputBuffers(size_t number) = 0; |
| 139 | 140 |
| 140 // Resets the accelerator. When it is done, Client::OnResetDone() will | 141 // Resets the accelerator. When it is done, Client::OnResetDone() will |
| 141 // be called. Afterwards, all buffers won't be accessed by the accelerator | 142 // be called. Afterwards, all buffers won't be accessed by the accelerator |
| 142 // and there won't be more callbacks. | 143 // and there won't be more callbacks. |
| 143 virtual void Reset() = 0; | 144 virtual void Reset() = 0; |
| 144 | 145 |
| 145 virtual ~ArcVideoAccelerator() {} | 146 virtual ~ArcVideoAccelerator() {} |
| 146 }; | 147 }; |
| 147 | 148 |
| 148 } // namespace arc | 149 } // namespace arc |
| 149 } // namespace chromeos | 150 } // namespace chromeos |
| 150 | 151 |
| 151 #endif // CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ | 152 #endif // CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ |
| OLD | NEW |