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

Unified Diff: ui/gl/gl_image_linux_dma_buffer.cc

Issue 962723002: Change CHROMIUM_image declarations to support multi planar input. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Trybot issues fixed. Created 5 years, 9 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
Index: ui/gl/gl_image_linux_dma_buffer.cc
diff --git a/ui/gl/gl_image_linux_dma_buffer.cc b/ui/gl/gl_image_linux_dma_buffer.cc
index 04ad06bd438433b270c60b804509a088d08e0a44..348238ab36fcf11435feb6bf361cca72d7878c73 100644
--- a/ui/gl/gl_image_linux_dma_buffer.cc
+++ b/ui/gl/gl_image_linux_dma_buffer.cc
@@ -97,9 +97,21 @@ GLImageLinuxDMABuffer::GLImageLinuxDMABuffer(const gfx::Size& size,
GLImageLinuxDMABuffer::~GLImageLinuxDMABuffer() {
}
-bool GLImageLinuxDMABuffer::Initialize(const base::FileDescriptor& handle,
- gfx::GpuMemoryBuffer::Format format,
- int pitch) {
+bool GLImageLinuxDMABuffer::Initialize(
+ int num_buffers,
+ const std::vector<base::FileDescriptor>& handles,
+ const std::vector<gfx::GpuMemoryBuffer::Format>& formats,
+ const std::vector<int>& pitches) {
+ // TODO(emircan): See http://crbug.com/439520; support passing multiple
+ // buffers when new multi-planar formats are added.
+ if (num_buffers != 1) {
+ NOTIMPLEMENTED();
+ return false;
+ }
+ const base::FileDescriptor& handle = handles[0];
+ const gfx::GpuMemoryBuffer::Format& format = formats[0];
+ int pitch = pitches[0];
+
if (!ValidFormat(internalformat_, format)) {
LOG(ERROR) << "Invalid format: " << internalformat_;
return false;

Powered by Google App Engine
This is Rietveld 408576698