Chromium Code Reviews| Index: ui/gl/gl_image_ozone_native_pixmap.h |
| diff --git a/ui/gl/gl_image_ozone_native_pixmap.h b/ui/gl/gl_image_ozone_native_pixmap.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..aee54ee20f34103994f5462cb8fc7bd09617620d |
| --- /dev/null |
| +++ b/ui/gl/gl_image_ozone_native_pixmap.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2015 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_OZONE_NATIVE_PIXMAP_H_ |
| +#define UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ |
| + |
| +#include "ui/gfx/gpu_memory_buffer.h" |
| +#include "ui/gl/gl_image_linux_dma_buffer.h" |
| +#include "ui/ozone/public/native_pixmap.h" |
| + |
| +namespace gfx { |
| + |
| +class GL_EXPORT GLImageOzoneNativePixmap : public GLImageLinuxDMABuffer { |
|
reveman
2015/07/28 19:11:17
It's confusing to inherit from GLImageLinuxDMABuff
dshwang
2015/07/29 13:23:09
Good point! This class inherits GLImageEGL and rem
|
| + public: |
| + GLImageOzoneNativePixmap(const Size& size, unsigned internalformat); |
| + bool Initialize(scoped_refptr<ui::NativePixmap> pixmap, |
|
reveman
2015/07/28 19:11:17
nit: blank line after ctor and ui::NativePixmap* i
dshwang
2015/07/29 13:23:09
blank line after ctor: Done.
ui::NativePixmap* ins
reveman
2015/07/29 14:16:41
We don't use scoped_refptr for that purpose in chr
dshwang
2015/07/29 15:15:04
I see. Done.
|
| + GpuMemoryBuffer::Format format); |
| + |
| + void Destroy(bool have_context) override; |
|
reveman
2015/07/28 19:11:17
Above this line, add:
// Overridden from GLImage:
dshwang
2015/07/29 13:23:10
Done.
|
| + bool ScheduleOverlayPlane(AcceleratedWidget widget, |
| + int z_order, |
| + OverlayTransform transform, |
| + const Rect& bounds_rect, |
| + const RectF& crop_rect) override; |
| + |
| + protected: |
| + ~GLImageOzoneNativePixmap() override; |
| + |
| + private: |
| + scoped_refptr<ui::NativePixmap> pixmap_; |
| +}; |
| + |
| +} // namespace gfx |
| + |
| +#endif // UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ |