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/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/native_library.h" | 10 #include "base/native_library.h" |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
119 // used to select a display configuration. Note that all properties should be | 119 // used to select a display configuration. Note that all properties should be |
120 // immediately followed by the corresponding desired value and array should be | 120 // immediately followed by the corresponding desired value and array should be |
121 // terminated with EGL_NONE. Ownership of the array is not transferred to | 121 // terminated with EGL_NONE. Ownership of the array is not transferred to |
122 // caller. desired_list contains list of desired EGL properties and values. | 122 // caller. desired_list contains list of desired EGL properties and values. |
123 virtual const int32* GetEGLSurfaceProperties(const int32* desired_list); | 123 virtual const int32* GetEGLSurfaceProperties(const int32* desired_list); |
124 | 124 |
125 // Get the hal struct to check for overlay support. | 125 // Get the hal struct to check for overlay support. |
126 virtual OverlayCandidatesOzone* GetOverlayCandidates( | 126 virtual OverlayCandidatesOzone* GetOverlayCandidates( |
127 gfx::AcceleratedWidget w); | 127 gfx::AcceleratedWidget w); |
128 | 128 |
129 // Cleate a single native buffer to be used for overlay planes or zero copy. | 129 // Cleate a single native buffer to be used for overlay planes or zero copy |
dnicoara
2014/11/20 21:19:44
nit: "Create"
| |
130 virtual scoped_refptr<NativePixmap> CreateNativePixmap(gfx::Size size, | 130 // for |widget| representing a particular display controller or default |
131 BufferFormat format, | 131 // display controller for kNullAcceleratedWidget. |
132 BufferUsage usage); | 132 virtual scoped_refptr<NativePixmap> CreateNativePixmap( |
133 gfx::AcceleratedWidget widget, | |
134 gfx::Size size, | |
135 BufferFormat format, | |
136 BufferUsage usage); | |
133 | 137 |
134 // Sets the overlay plane to switch to at the next page flip. | 138 // Sets the overlay plane to switch to at the next page flip. |
135 // |w| specifies the screen to display this overlay plane on. | 139 // |w| specifies the screen to display this overlay plane on. |
136 // |plane_z_order| specifies the stacking order of the plane relative to the | 140 // |plane_z_order| specifies the stacking order of the plane relative to the |
137 // main framebuffer located at index 0. | 141 // main framebuffer located at index 0. |
138 // |plane_transform| specifies how the buffer is to be transformed during. | 142 // |plane_transform| specifies how the buffer is to be transformed during. |
139 // composition. | 143 // composition. |
140 // |buffer| to be presented by the overlay. | 144 // |buffer| to be presented by the overlay. |
141 // |display_bounds| specify where it is supposed to be on the screen. | 145 // |display_bounds| specify where it is supposed to be on the screen. |
142 // |crop_rect| specifies the region within the buffer to be placed | 146 // |crop_rect| specifies the region within the buffer to be placed |
(...skipping 15 matching lines...) Expand all Loading... | |
158 // such as MAP for zero copy or SCANOUT for display controller. | 162 // such as MAP for zero copy or SCANOUT for display controller. |
159 virtual bool CanCreateNativePixmap(BufferUsage usage); | 163 virtual bool CanCreateNativePixmap(BufferUsage usage); |
160 | 164 |
161 private: | 165 private: |
162 static SurfaceFactoryOzone* impl_; // not owned | 166 static SurfaceFactoryOzone* impl_; // not owned |
163 }; | 167 }; |
164 | 168 |
165 } // namespace ui | 169 } // namespace ui |
166 | 170 |
167 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 171 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
OLD | NEW |