OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_OZONE_NATIVE_PIXMAP_H_ | 5 #ifndef UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ |
6 #define UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ | 6 #define UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_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 #include "ui/ozone/public/native_pixmap.h" | 10 #include "ui/ozone/public/native_pixmap.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 | 13 |
14 class GL_EXPORT GLImageOzoneNativePixmap : public GLImageEGL { | 14 class GL_EXPORT GLImageOzoneNativePixmap : public GLImageEGL { |
15 public: | 15 public: |
16 GLImageOzoneNativePixmap(const Size& size, unsigned internalformat); | 16 GLImageOzoneNativePixmap(const Size& size, unsigned internalformat); |
17 | 17 |
18 bool Initialize(ui::NativePixmap* pixmap, GpuMemoryBuffer::Format format); | 18 bool Initialize(ui::NativePixmap* pixmap, BufferFormat format); |
19 | 19 |
20 // Overridden from GLImage: | 20 // Overridden from GLImage: |
21 unsigned GetInternalFormat() override; | 21 unsigned GetInternalFormat() override; |
22 void Destroy(bool have_context) override; | 22 void Destroy(bool have_context) override; |
23 bool ScheduleOverlayPlane(AcceleratedWidget widget, | 23 bool ScheduleOverlayPlane(AcceleratedWidget widget, |
24 int z_order, | 24 int z_order, |
25 OverlayTransform transform, | 25 OverlayTransform transform, |
26 const Rect& bounds_rect, | 26 const Rect& bounds_rect, |
27 const RectF& crop_rect) override; | 27 const RectF& crop_rect) override; |
28 | 28 |
29 protected: | 29 protected: |
30 ~GLImageOzoneNativePixmap() override; | 30 ~GLImageOzoneNativePixmap() override; |
31 | 31 |
32 private: | 32 private: |
33 unsigned internalformat_; | 33 unsigned internalformat_; |
34 scoped_refptr<ui::NativePixmap> pixmap_; | 34 scoped_refptr<ui::NativePixmap> pixmap_; |
35 }; | 35 }; |
36 | 36 |
37 } // namespace gfx | 37 } // namespace gfx |
38 | 38 |
39 #endif // UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ | 39 #endif // UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ |
OLD | NEW |