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

Side by Side Diff: chrome/gpu/arc_video_accelerator.h

Issue 1953683002: Add stride for imported Dmabuf in ArcVideoAccelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address posciak's comments Created 4 years, 7 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
« no previous file with comments | « chrome/gpu/arc_gpu_video_decode_accelerator.cc ('k') | chrome/gpu/gpu_arc_video_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // multiple times without additional bindings. 113 // multiple times without additional bindings.
114 virtual void BindSharedMemory(PortType port, 114 virtual void BindSharedMemory(PortType port,
115 uint32_t index, 115 uint32_t index,
116 base::ScopedFD ashmem_fd, 116 base::ScopedFD ashmem_fd,
117 off_t offset, 117 off_t offset,
118 size_t length) = 0; 118 size_t length) = 0;
119 119
120 // Assigns a buffer to be used for the accelerator at the specified 120 // Assigns a buffer to be used for the accelerator at the specified
121 // port and index. A buffer must be successfully bound before it can be 121 // port and index. A buffer must be successfully bound before it can be
122 // passed to the accelerator via UseBuffer(). Already bound buffers may be 122 // passed to the accelerator via UseBuffer(). Already bound buffers may be
123 // reused multiple times without additional bindings. 123 // reused multiple times without additional bindings. |stride| is counted in
124 // bytes.
124 virtual void BindDmabuf(PortType port, 125 virtual void BindDmabuf(PortType port,
125 uint32_t index, 126 uint32_t index,
126 base::ScopedFD dmabuf_fd) = 0; 127 base::ScopedFD dmabuf_fd,
128 int32_t stride) = 0;
127 129
128 // Passes a buffer to the accelerator. For input buffer, the accelerator 130 // Passes a buffer to the accelerator. For input buffer, the accelerator
129 // will process it. For output buffer, the accelerator will output content 131 // will process it. For output buffer, the accelerator will output content
130 // to it. 132 // to it.
131 virtual void UseBuffer(PortType port, 133 virtual void UseBuffer(PortType port,
132 uint32_t index, 134 uint32_t index,
133 const BufferMetadata& metadata) = 0; 135 const BufferMetadata& metadata) = 0;
134 136
135 // 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
136 // be called. 138 // be called.
137 virtual void SetNumberOfOutputBuffers(size_t number) = 0; 139 virtual void SetNumberOfOutputBuffers(size_t number) = 0;
138 140
139 // Resets the accelerator. When it is done, Client::OnResetDone() will 141 // Resets the accelerator. When it is done, Client::OnResetDone() will
140 // 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
141 // and there won't be more callbacks. 143 // and there won't be more callbacks.
142 virtual void Reset() = 0; 144 virtual void Reset() = 0;
143 145
144 // Flushes the accelerator. After all the output buffers pending decode have 146 // Flushes the accelerator. After all the output buffers pending decode have
145 // been returned to client by OnBufferDone(), Client::OnFlushDone() will be 147 // been returned to client by OnBufferDone(), Client::OnFlushDone() will be
146 // called. 148 // called.
147 virtual void Flush() = 0; 149 virtual void Flush() = 0;
148 150
149 virtual ~ArcVideoAccelerator() {} 151 virtual ~ArcVideoAccelerator() {}
150 }; 152 };
151 153
152 } // namespace arc 154 } // namespace arc
153 } // namespace chromeos 155 } // namespace chromeos
154 156
155 #endif // CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_ 157 #endif // CHROME_GPU_ARC_VIDEO_ACCELERATOR_H_
OLDNEW
« no previous file with comments | « chrome/gpu/arc_gpu_video_decode_accelerator.cc ('k') | chrome/gpu/gpu_arc_video_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698