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

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: 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
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
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,
126 uint32_t index, 126 uint32_t index,
127 base::ScopedFD dmabuf_fd) = 0; 127 base::ScopedFD dmabuf_fd,
128 int32_t stride) = 0;
kcwu 2016/05/05 10:10:05 add comments that stride is counting in bytes.
kcwu 2016/05/09 08:54:30 this is not addressed yet.
Owen Lin 2016/05/11 01:39:59 Done.
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698