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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 virtual intptr_t GetNativeDisplay(); | 83 virtual intptr_t GetNativeDisplay(); |
84 | 84 |
85 // Create SurfaceOzoneEGL for the specified gfx::AcceleratedWidget. | 85 // Create SurfaceOzoneEGL for the specified gfx::AcceleratedWidget. |
86 // | 86 // |
87 // Note: When used from content, this is called in the GPU process. The | 87 // Note: When used from content, this is called in the GPU process. The |
88 // platform must support creation of SurfaceOzoneEGL from the GPU process | 88 // platform must support creation of SurfaceOzoneEGL from the GPU process |
89 // using only the handle contained in gfx::AcceleratedWidget. | 89 // using only the handle contained in gfx::AcceleratedWidget. |
90 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( | 90 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( |
91 gfx::AcceleratedWidget widget); | 91 gfx::AcceleratedWidget widget); |
92 | 92 |
| 93 // Create an EGL surface that isn't backed by any buffers, and is used |
| 94 // for overlay-only displays. This will return NULL if this mode is |
| 95 // not supported. |
| 96 virtual scoped_ptr<SurfaceOzoneEGL> CreateSurfacelessEGLSurfaceForWidget( |
| 97 gfx::AcceleratedWidget widget); |
| 98 |
93 // Create SurfaceOzoneCanvas for the specified gfx::AcceleratedWidget. | 99 // Create SurfaceOzoneCanvas for the specified gfx::AcceleratedWidget. |
94 // | 100 // |
95 // Note: The platform must support creation of SurfaceOzoneCanvas from the | 101 // Note: The platform must support creation of SurfaceOzoneCanvas from the |
96 // Browser Process using only the handle contained in gfx::AcceleratedWidget. | 102 // Browser Process using only the handle contained in gfx::AcceleratedWidget. |
97 virtual scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( | 103 virtual scoped_ptr<SurfaceOzoneCanvas> CreateCanvasForWidget( |
98 gfx::AcceleratedWidget widget); | 104 gfx::AcceleratedWidget widget); |
99 | 105 |
100 // Sets up GL bindings for the native surface. Takes two callback parameters | 106 // Sets up GL bindings for the native surface. Takes two callback parameters |
101 // that allow Ozone to register the GL bindings. | 107 // that allow Ozone to register the GL bindings. |
102 virtual bool LoadEGLGLES2Bindings( | 108 virtual bool LoadEGLGLES2Bindings( |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 // overlay-only mode. | 148 // overlay-only mode. |
143 virtual bool CanShowPrimaryPlaneAsOverlay(); | 149 virtual bool CanShowPrimaryPlaneAsOverlay(); |
144 | 150 |
145 private: | 151 private: |
146 static SurfaceFactoryOzone* impl_; // not owned | 152 static SurfaceFactoryOzone* impl_; // not owned |
147 }; | 153 }; |
148 | 154 |
149 } // namespace ui | 155 } // namespace ui |
150 | 156 |
151 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 157 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
OLD | NEW |