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

Unified Diff: chrome/gpu/arc_gpu_video_decode_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/gpu/arc_gpu_video_decode_accelerator.cc » ('j') | chrome/gpu/arc_video_accelerator.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/arc_gpu_video_decode_accelerator.h
diff --git a/chrome/gpu/arc_gpu_video_decode_accelerator.h b/chrome/gpu/arc_gpu_video_decode_accelerator.h
index e29f9aaa69344014aa6a94692a838ac119e410b8..48a150cf4ffe3fe8292f1cd83c5145c22539c3e7 100644
--- a/chrome/gpu/arc_gpu_video_decode_accelerator.h
+++ b/chrome/gpu/arc_gpu_video_decode_accelerator.h
@@ -42,7 +42,8 @@ class ArcGpuVideoDecodeAccelerator
size_t length) override;
void BindDmabuf(PortType port,
uint32_t index,
- base::ScopedFD dmabuf_fd) override;
+ base::ScopedFD dmabuf_fd,
+ int32_t stride) override;
void UseBuffer(PortType port,
uint32_t index,
const BufferMetadata& metadata) override;
@@ -78,12 +79,22 @@ class ArcGpuVideoDecodeAccelerator
// The file handle to access the buffer. It is owned by this class and
// should be closed after use.
base::ScopedFD handle;
- off_t offset;
- size_t length;
+ off_t offset = 0;
+ size_t length = 0;
- InputBufferInfo();
- InputBufferInfo(InputBufferInfo&& other);
- ~InputBufferInfo();
+ InputBufferInfo() = default;
kcwu 2016/05/05 10:10:04 IIUC, please put these "= default" lines in .cpp i
Owen Lin 2016/05/06 05:38:34 Done.
+ InputBufferInfo(InputBufferInfo&& other) = default;
+ ~InputBufferInfo() = default;
+ };
+
+ // The information about the Dmabuf used as an output buffer.
+ struct OutputBufferInfo {
+ base::ScopedFD handle;
+ int32_t stride;
kcwu 2016/05/05 10:10:05 = 0
Owen Lin 2016/05/06 05:38:34 Done.
+
+ OutputBufferInfo() = default;
+ OutputBufferInfo(OutputBufferInfo&& other) = default;
+ ~OutputBufferInfo() = default;
};
// Helper function to Send the end-of-stream output buffer if
@@ -136,7 +147,7 @@ class ArcGpuVideoDecodeAccelerator
// To keep those output buffers which have been bound by bindDmabuf() but not
// be used yet. Will call VDA::ImportBufferForPicture() when those buffers are
// used for the first time.
- std::vector<base::ScopedFD> buffers_pending_import_;
+ std::vector<OutputBufferInfo> buffers_pending_import_;
base::ThreadChecker thread_checker_;
size_t output_buffer_size_;
« no previous file with comments | « no previous file | chrome/gpu/arc_gpu_video_decode_accelerator.cc » ('j') | chrome/gpu/arc_video_accelerator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698