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. | |
104 virtual void GetSupportedFormats(std::vector<uint32_t>* support_formats); | |
kalyank
2016/01/19 07:34:22
We want to pass in the usage too i.e. BufferUsage
william.xie
2016/01/19 10:07:07
Done.
| |
105 | |
103 // Create a single native buffer to be used for overlay planes or zero copy | 106 // Create a single native buffer to be used for overlay planes or zero copy |
104 // for |widget| representing a particular display controller or default | 107 // for |widget| representing a particular display controller or default |
105 // display controller for kNullAcceleratedWidget. | 108 // display controller for kNullAcceleratedWidget. |
106 // It can be called on any thread. | 109 // It can be called on any thread. |
107 virtual scoped_refptr<NativePixmap> CreateNativePixmap( | 110 virtual scoped_refptr<NativePixmap> CreateNativePixmap( |
108 gfx::AcceleratedWidget widget, | 111 gfx::AcceleratedWidget widget, |
109 gfx::Size size, | 112 gfx::Size size, |
110 gfx::BufferFormat format, | 113 gfx::BufferFormat format, |
111 gfx::BufferUsage usage); | 114 gfx::BufferUsage usage); |
112 | 115 |
113 // Create a single native buffer from an existing handle. Takes ownership of | 116 // Create a single native buffer from an existing handle. Takes ownership of |
114 // |handle| and can be called on any thread. | 117 // |handle| and can be called on any thread. |
115 virtual scoped_refptr<NativePixmap> CreateNativePixmapFromHandle( | 118 virtual scoped_refptr<NativePixmap> CreateNativePixmapFromHandle( |
116 const gfx::NativePixmapHandle& handle); | 119 const gfx::NativePixmapHandle& handle); |
117 | 120 |
118 protected: | 121 protected: |
119 SurfaceFactoryOzone(); | 122 SurfaceFactoryOzone(); |
120 virtual ~SurfaceFactoryOzone(); | 123 virtual ~SurfaceFactoryOzone(); |
121 | 124 |
122 private: | 125 private: |
123 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); | 126 DISALLOW_COPY_AND_ASSIGN(SurfaceFactoryOzone); |
124 }; | 127 }; |
125 | 128 |
126 } // namespace ui | 129 } // namespace ui |
127 | 130 |
128 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 131 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
OLD | NEW |