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

Unified Diff: ui/gl/gl_image_linux_dma_buffer.h

Issue 211133005: [WIP] Not for review. Zero copy. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 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 | « ui/gl/gl.gyp ('k') | ui/gl/gl_image_linux_dma_buffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_image_linux_dma_buffer.h
diff --git a/ui/gl/gl_image_linux_dma_buffer.h b/ui/gl/gl_image_linux_dma_buffer.h
new file mode 100644
index 0000000000000000000000000000000000000000..e6063ee6d5f28aa6f11244aa90c6be08ac92656d
--- /dev/null
+++ b/ui/gl/gl_image_linux_dma_buffer.h
@@ -0,0 +1,31 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
+#define UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
+
+#include "ui/gl/gl_image_egl.h"
+
+namespace gfx {
+
+class GL_EXPORT GLImageLinuxDMABuffer : public GLImageEGL {
+ public:
+ GLImageLinuxDMABuffer(gfx::Size size, unsigned internalformat);
+
+ // Note: this expects the first sample to be stored at offset 0 in dma_buf and
+ // stride to be a multiple of 64.
+ bool Initialize(gfx::GpuMemoryBufferHandle buffer);
+
+ protected:
+ virtual ~GLImageLinuxDMABuffer();
+
+ private:
+ unsigned internalformat_;
+
+ DISALLOW_COPY_AND_ASSIGN(GLImageLinuxDMABuffer);
+};
+
+} // namespace gfx
+
+#endif // UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
« no previous file with comments | « ui/gl/gl.gyp ('k') | ui/gl/gl_image_linux_dma_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698