| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_OZONE_PUBLIC_NATIVE_PIXMAP_H_ | 5 #ifndef UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ |
| 6 #define UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ | 6 #define UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ |
| 7 | 7 |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "ui/gfx/native_pixmap_handle_ozone.h" | 10 #include "ui/gfx/native_pixmap_handle_ozone.h" |
| 11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
| 12 #include "ui/gfx/overlay_transform.h" | 12 #include "ui/gfx/overlay_transform.h" |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Rect; | 15 class Rect; |
| 16 class RectF; | 16 class RectF; |
| 17 } | 17 } |
| 18 | 18 |
| 19 namespace ui { | 19 namespace ui { |
| 20 | 20 |
| 21 // This represents a buffer that can be directly imported via GL for | 21 // This represents a buffer that can be directly imported via GL for |
| 22 // rendering, or exported via dma-buf fds. | 22 // rendering, or exported via dma-buf fds. |
| 23 class NativePixmap : public base::RefCountedThreadSafe<NativePixmap> { | 23 class NativePixmap : public base::RefCountedThreadSafe<NativePixmap> { |
| 24 public: | 24 public: |
| 25 NativePixmap() {} | 25 NativePixmap() {} |
| 26 | 26 |
| 27 virtual void* /* EGLClientBuffer */ GetEGLClientBuffer() = 0; | 27 virtual void* /* EGLClientBuffer */ GetEGLClientBuffer() = 0; |
| 28 virtual int GetDmaBufFd() = 0; | 28 virtual int GetDmaBufFd() = 0; |
| 29 virtual int GetDmaBufPitch() = 0; | 29 virtual int GetDmaBufPitch() = 0; |
| 30 virtual gfx::BufferFormat GetPixelFormat() = 0; |
| 30 | 31 |
| 31 // Sets the overlay plane to switch to at the next page flip. | 32 // Sets the overlay plane to switch to at the next page flip. |
| 32 // |w| specifies the screen to display this overlay plane on. | 33 // |w| specifies the screen to display this overlay plane on. |
| 33 // |plane_z_order| specifies the stacking order of the plane relative to the | 34 // |plane_z_order| specifies the stacking order of the plane relative to the |
| 34 // main framebuffer located at index 0. | 35 // main framebuffer located at index 0. |
| 35 // |plane_transform| specifies how the buffer is to be transformed during. | 36 // |plane_transform| specifies how the buffer is to be transformed during. |
| 36 // composition. | 37 // composition. |
| 37 // |buffer| to be presented by the overlay. | 38 // |buffer| to be presented by the overlay. |
| 38 // |display_bounds| specify where it is supposed to be on the screen. | 39 // |display_bounds| specify where it is supposed to be on the screen. |
| 39 // |crop_rect| specifies the region within the buffer to be placed | 40 // |crop_rect| specifies the region within the buffer to be placed |
| (...skipping 23 matching lines...) Expand all Loading... |
| 63 | 64 |
| 64 private: | 65 private: |
| 65 friend class base::RefCountedThreadSafe<NativePixmap>; | 66 friend class base::RefCountedThreadSafe<NativePixmap>; |
| 66 | 67 |
| 67 DISALLOW_COPY_AND_ASSIGN(NativePixmap); | 68 DISALLOW_COPY_AND_ASSIGN(NativePixmap); |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 } // namespace ui | 71 } // namespace ui |
| 71 | 72 |
| 72 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ | 73 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_H_ |
| OLD | NEW |