OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_SURFACE_FACTORY_OZONE_H_ | 5 #ifndef UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
6 #define UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 6 #define UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/file_descriptor_posix.h" |
9 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
10 #include "base/native_library.h" | 11 #include "base/native_library.h" |
11 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
12 #include "ui/gfx/native_widget_types.h" | 13 #include "ui/gfx/native_widget_types.h" |
13 #include "ui/gfx/overlay_transform.h" | 14 #include "ui/gfx/overlay_transform.h" |
14 #include "ui/ozone/ozone_base_export.h" | 15 #include "ui/ozone/ozone_base_export.h" |
15 | 16 |
16 namespace ui { | 17 namespace ui { |
17 | 18 |
18 class NativePixmap; | 19 class NativePixmap; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // Create a single native buffer to be used for overlay planes or zero copy | 115 // Create a single native buffer to be used for overlay planes or zero copy |
115 // for |widget| representing a particular display controller or default | 116 // for |widget| representing a particular display controller or default |
116 // display controller for kNullAcceleratedWidget. | 117 // display controller for kNullAcceleratedWidget. |
117 // It can be called on any thread. | 118 // It can be called on any thread. |
118 virtual scoped_refptr<NativePixmap> CreateNativePixmap( | 119 virtual scoped_refptr<NativePixmap> CreateNativePixmap( |
119 gfx::AcceleratedWidget widget, | 120 gfx::AcceleratedWidget widget, |
120 gfx::Size size, | 121 gfx::Size size, |
121 BufferFormat format, | 122 BufferFormat format, |
122 BufferUsage usage); | 123 BufferUsage usage); |
123 | 124 |
| 125 // Export GpuMemoryBufferHandle from |pixmap|. |
| 126 virtual base::FileDescriptor ExportDmaBuf(gfx::AcceleratedWidget widget, |
| 127 scoped_refptr<NativePixmap> pixmap); |
| 128 |
124 // Sets the overlay plane to switch to at the next page flip. | 129 // Sets the overlay plane to switch to at the next page flip. |
125 // |w| specifies the screen to display this overlay plane on. | 130 // |w| specifies the screen to display this overlay plane on. |
126 // |plane_z_order| specifies the stacking order of the plane relative to the | 131 // |plane_z_order| specifies the stacking order of the plane relative to the |
127 // main framebuffer located at index 0. | 132 // main framebuffer located at index 0. |
128 // |plane_transform| specifies how the buffer is to be transformed during. | 133 // |plane_transform| specifies how the buffer is to be transformed during. |
129 // composition. | 134 // composition. |
130 // |buffer| to be presented by the overlay. | 135 // |buffer| to be presented by the overlay. |
131 // |display_bounds| specify where it is supposed to be on the screen. | 136 // |display_bounds| specify where it is supposed to be on the screen. |
132 // |crop_rect| specifies the region within the buffer to be placed | 137 // |crop_rect| specifies the region within the buffer to be placed |
133 // inside |display_bounds|. This is specified in texture coordinates, in the | 138 // inside |display_bounds|. This is specified in texture coordinates, in the |
(...skipping 14 matching lines...) Expand all Loading... |
148 SurfaceFactoryOzone(); | 153 SurfaceFactoryOzone(); |
149 virtual ~SurfaceFactoryOzone(); | 154 virtual ~SurfaceFactoryOzone(); |
150 | 155 |
151 private: | 156 private: |
152 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); | 157 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); |
153 }; | 158 }; |
154 | 159 |
155 } // namespace ui | 160 } // namespace ui |
156 | 161 |
157 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 162 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
OLD | NEW |