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

Side by Side Diff: ui/gl/gl_image_linux_dma_buffer.h

Issue 1140683002: glBindTexImage2DCHROMIUM should retain pixel format. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_ 5 #ifndef UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
6 #define UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_ 6 #define UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
7 7
8 #include "ui/gfx/gpu_memory_buffer.h" 8 #include "ui/gfx/gpu_memory_buffer.h"
9 #include "ui/gl/gl_image_egl.h" 9 #include "ui/gl/gl_image_egl.h"
10 10
11 namespace gfx { 11 namespace gfx {
12 12
13 class GL_EXPORT GLImageLinuxDMABuffer : public GLImageEGL { 13 class GL_EXPORT GLImageLinuxDMABuffer : public GLImageEGL {
14 public: 14 public:
15 GLImageLinuxDMABuffer(const Size& size, unsigned internalformat); 15 GLImageLinuxDMABuffer(const Size& size, unsigned internalformat);
16 16
17 // Returns true on success and the file descriptor can be closed as the 17 // Returns true on success and the file descriptor can be closed as the
18 // implementation will take a reference to the dma_buf. 18 // implementation will take a reference to the dma_buf.
19 bool Initialize(const base::FileDescriptor& handle, 19 bool Initialize(const base::FileDescriptor& handle,
20 GpuMemoryBuffer::Format format, 20 GpuMemoryBuffer::Format format,
21 int pitch); 21 int pitch);
22 22
23 // Overridden from GLImageEGL:
reveman 2015/05/12 15:27:19 nit: "// Overridden from GLImage:" as I think thes
24 unsigned GetFormat() override;
25
23 protected: 26 protected:
24 ~GLImageLinuxDMABuffer() override; 27 ~GLImageLinuxDMABuffer() override;
25 28
26 private: 29 private:
27 unsigned internalformat_; 30 unsigned internalformat_;
28 31
29 DISALLOW_COPY_AND_ASSIGN(GLImageLinuxDMABuffer); 32 DISALLOW_COPY_AND_ASSIGN(GLImageLinuxDMABuffer);
30 }; 33 };
31 34
32 } // namespace gfx 35 } // namespace gfx
33 36
34 #endif // UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_ 37 #endif // UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698