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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 AddGLLibraryCallback add_gl_library, | 93 AddGLLibraryCallback add_gl_library, |
94 SetGLGetProcAddressProcCallback set_gl_get_proc_address) = 0; | 94 SetGLGetProcAddressProcCallback set_gl_get_proc_address) = 0; |
95 | 95 |
96 // Returns an array of EGL properties, which can be used in any EGL function | 96 // Returns an array of EGL properties, which can be used in any EGL function |
97 // used to select a display configuration. Note that all properties should be | 97 // used to select a display configuration. Note that all properties should be |
98 // immediately followed by the corresponding desired value and array should be | 98 // immediately followed by the corresponding desired value and array should be |
99 // terminated with EGL_NONE. Ownership of the array is not transferred to | 99 // terminated with EGL_NONE. Ownership of the array is not transferred to |
100 // caller. desired_list contains list of desired EGL properties and values. | 100 // caller. desired_list contains list of desired EGL properties and values. |
101 virtual const int32_t* GetEGLSurfaceProperties(const int32_t* desired_list); | 101 virtual const int32_t* GetEGLSurfaceProperties(const int32_t* desired_list); |
102 | 102 |
| 103 // Returns all scanout formats for |widget| representing a particular display |
| 104 // controller or default display controller for kNullAcceleratedWidget. |
| 105 virtual std::vector<gfx::BufferFormat> GetScanoutFormats( |
| 106 gfx::AcceleratedWidget widget); |
| 107 |
103 // Create a single native buffer to be used for overlay planes or zero copy | 108 // Create a single native buffer to be used for overlay planes or zero copy |
104 // for |widget| representing a particular display controller or default | 109 // for |widget| representing a particular display controller or default |
105 // display controller for kNullAcceleratedWidget. | 110 // display controller for kNullAcceleratedWidget. |
106 // It can be called on any thread. | 111 // It can be called on any thread. |
107 virtual scoped_refptr<NativePixmap> CreateNativePixmap( | 112 virtual scoped_refptr<NativePixmap> CreateNativePixmap( |
108 gfx::AcceleratedWidget widget, | 113 gfx::AcceleratedWidget widget, |
109 gfx::Size size, | 114 gfx::Size size, |
110 gfx::BufferFormat format, | 115 gfx::BufferFormat format, |
111 gfx::BufferUsage usage); | 116 gfx::BufferUsage usage); |
112 | 117 |
113 // Create a single native buffer from an existing handle. Takes ownership of | 118 // Create a single native buffer from an existing handle. Takes ownership of |
114 // |handle| and can be called on any thread. | 119 // |handle| and can be called on any thread. |
115 virtual scoped_refptr<NativePixmap> CreateNativePixmapFromHandle( | 120 virtual scoped_refptr<NativePixmap> CreateNativePixmapFromHandle( |
116 const gfx::NativePixmapHandle& handle); | 121 const gfx::NativePixmapHandle& handle); |
117 | 122 |
118 protected: | 123 protected: |
119 SurfaceFactoryOzone(); | 124 SurfaceFactoryOzone(); |
120 virtual ~SurfaceFactoryOzone(); | 125 virtual ~SurfaceFactoryOzone(); |
121 | 126 |
122 private: | 127 private: |
123 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); | 128 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); |
124 }; | 129 }; |
125 | 130 |
126 } // namespace ui | 131 } // namespace ui |
127 | 132 |
128 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 133 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
OLD | NEW |