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..b09867a99d1f6b4b5d79e80176f20e57d9455b7d |
--- /dev/null |
+++ b/ui/gl/gl_image_ozone_native_pixmap.h |
@@ -0,0 +1,39 @@ |
+// 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_egl.h" |
+#include "ui/ozone/public/native_pixmap.h" |
+ |
+namespace gfx { |
+ |
+class GL_EXPORT GLImageOzoneNativePixmap : public GLImageEGL { |
+ public: |
+ GLImageOzoneNativePixmap(const Size& size, unsigned internalformat); |
+ |
+ bool Initialize(ui::NativePixmap* pixmap, GpuMemoryBuffer::Format format); |
+ |
+ // Overridden from GLImage: |
+ unsigned GetInternalFormat() override; |
+ void Destroy(bool have_context) override; |
+ bool ScheduleOverlayPlane(AcceleratedWidget widget, |
+ int z_order, |
+ OverlayTransform transform, |
+ const Rect& bounds_rect, |
+ const RectF& crop_rect) override; |
+ |
+ protected: |
+ ~GLImageOzoneNativePixmap() override; |
+ |
+ private: |
+ unsigned internalformat_; |
+ scoped_refptr<ui::NativePixmap> pixmap_; |
+}; |
+ |
+} // namespace gfx |
+ |
+#endif // UI_GL_GL_IMAGE_OZONE_NATIVE_PIXMAP_H_ |