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 formats which can be scanned out by this PlaneManager for the | |
104 // specified gfx::AcceleratedWidget. Be careful that secondary device may not | |
105 // have all the formats of the primary device. | |
kalyank
2016/01/22 06:41:25
Nit: I think you can remove the comment about seco
william.xie
2016/01/23 01:51:53
Done.
| |
106 virtual std::vector<gfx::BufferFormat> GetScanoutFormats( | |
107 gfx::AcceleratedWidget widget); | |
108 | |
103 // Create a single native buffer to be used for overlay planes or zero copy | 109 // Create a single native buffer to be used for overlay planes or zero copy |
104 // for |widget| representing a particular display controller or default | 110 // for |widget| representing a particular display controller or default |
105 // display controller for kNullAcceleratedWidget. | 111 // display controller for kNullAcceleratedWidget. |
106 // It can be called on any thread. | 112 // It can be called on any thread. |
107 virtual scoped_refptr<NativePixmap> CreateNativePixmap( | 113 virtual scoped_refptr<NativePixmap> CreateNativePixmap( |
108 gfx::AcceleratedWidget widget, | 114 gfx::AcceleratedWidget widget, |
109 gfx::Size size, | 115 gfx::Size size, |
110 gfx::BufferFormat format, | 116 gfx::BufferFormat format, |
111 gfx::BufferUsage usage); | 117 gfx::BufferUsage usage); |
112 | 118 |
113 // Create a single native buffer from an existing handle. Takes ownership of | 119 // Create a single native buffer from an existing handle. Takes ownership of |
114 // |handle| and can be called on any thread. | 120 // |handle| and can be called on any thread. |
115 virtual scoped_refptr<NativePixmap> CreateNativePixmapFromHandle( | 121 virtual scoped_refptr<NativePixmap> CreateNativePixmapFromHandle( |
116 const gfx::NativePixmapHandle& handle); | 122 const gfx::NativePixmapHandle& handle); |
117 | 123 |
118 protected: | 124 protected: |
119 SurfaceFactoryOzone(); | 125 SurfaceFactoryOzone(); |
120 virtual ~SurfaceFactoryOzone(); | 126 virtual ~SurfaceFactoryOzone(); |
121 | 127 |
122 private: | 128 private: |
123 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); | 129 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); |
124 }; | 130 }; |
125 | 131 |
126 } // namespace ui | 132 } // namespace ui |
127 | 133 |
128 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 134 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
OLD | NEW |