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