Supervised user whitelists: Cleanup
[chromium-blink-merge.git] / ui / gl / gl_image_linux_dma_buffer.h
blobaca911974927a87fac00b0553ba13ed7640d4e66
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
3 // found in the LICENSE file.
5 #ifndef UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
6 #define UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_
8 #include "ui/gfx/gpu_memory_buffer.h"
9 #include "ui/gl/gl_image_egl.h"
11 namespace gfx {
13 class GL_EXPORT GLImageLinuxDMABuffer : public GLImageEGL {
14 public:
15 GLImageLinuxDMABuffer(const Size& size, unsigned internalformat);
17 // Returns true on success and the file descriptor can be closed as the
18 // implementation will take a reference to the dma_buf.
19 bool Initialize(const base::FileDescriptor& handle,
20 GpuMemoryBuffer::Format format,
21 int pitch);
23 protected:
24 ~GLImageLinuxDMABuffer() override;
26 private:
27 unsigned internalformat_;
29 DISALLOW_COPY_AND_ASSIGN(GLImageLinuxDMABuffer);
32 } // namespace gfx
34 #endif // UI_GL_GL_IMAGE_LINUX_DMA_BUFFER_H_