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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "ui/gfx/buffer_types.h" | 10 #include "ui/gfx/buffer_types.h" |
11 #include "ui/gl/gl_export.h" | 11 #include "ui/gl/gl_export.h" |
12 #include "ui/gl/gl_image_egl.h" | 12 #include "ui/gl/gl_image_egl.h" |
13 #include "ui/ozone/public/native_pixmap.h" | 13 #include "ui/ozone/public/native_pixmap.h" |
14 | 14 |
15 namespace gfx { | 15 namespace gl { |
16 | 16 |
17 class GL_EXPORT GLImageOzoneNativePixmap : public gl::GLImageEGL { | 17 class GL_EXPORT GLImageOzoneNativePixmap : public gl::GLImageEGL { |
18 public: | 18 public: |
19 GLImageOzoneNativePixmap(const Size& size, unsigned internalformat); | 19 GLImageOzoneNativePixmap(const gfx::Size& size, unsigned internalformat); |
20 | 20 |
21 bool Initialize(ui::NativePixmap* pixmap, BufferFormat format); | 21 bool Initialize(ui::NativePixmap* pixmap, gfx::BufferFormat format); |
22 | 22 |
23 // Overridden from GLImage: | 23 // Overridden from GLImage: |
24 unsigned GetInternalFormat() override; | 24 unsigned GetInternalFormat() override; |
25 void Destroy(bool have_context) override; | 25 void Destroy(bool have_context) override; |
26 bool CopyTexImage(unsigned target) override; | 26 bool CopyTexImage(unsigned target) override; |
27 bool ScheduleOverlayPlane(AcceleratedWidget widget, | 27 bool ScheduleOverlayPlane(gfx::AcceleratedWidget widget, |
28 int z_order, | 28 int z_order, |
29 OverlayTransform transform, | 29 gfx::OverlayTransform transform, |
30 const Rect& bounds_rect, | 30 const gfx::Rect& bounds_rect, |
31 const RectF& crop_rect) override; | 31 const gfx::RectF& crop_rect) override; |
32 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, | 32 void OnMemoryDump(base::trace_event::ProcessMemoryDump* pmd, |
33 uint64_t process_tracing_id, | 33 uint64_t process_tracing_id, |
34 const std::string& dump_name) override; | 34 const std::string& dump_name) override; |
35 | 35 |
36 protected: | 36 protected: |
37 ~GLImageOzoneNativePixmap() override; | 37 ~GLImageOzoneNativePixmap() override; |
38 | 38 |
39 private: | 39 private: |
40 unsigned internalformat_; | 40 unsigned internalformat_; |
41 scoped_refptr<ui::NativePixmap> pixmap_; | 41 scoped_refptr<ui::NativePixmap> pixmap_; |
42 }; | 42 }; |
43 | 43 |
44 } // namespace gfx | 44 } // namespace gl |
45 | 45 |
46 #endif // UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ | 46 #endif // UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ |
OLD | NEW |