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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 virtual HardwareState InitializeHardware() = 0; | 90 virtual HardwareState InitializeHardware() = 0; |
91 | 91 |
92 // Cleans up display hardware state. Call this from within the GPU process. | 92 // Cleans up display hardware state. Call this from within the GPU process. |
93 // This method must be safe to run inside of the sandbox. | 93 // This method must be safe to run inside of the sandbox. |
94 virtual void ShutdownHardware() = 0; | 94 virtual void ShutdownHardware() = 0; |
95 | 95 |
96 // Returns native platform display handle. This is used to obtain the EGL | 96 // Returns native platform display handle. This is used to obtain the EGL |
97 // display connection for the native display. | 97 // display connection for the native display. |
98 virtual intptr_t GetNativeDisplay(); | 98 virtual intptr_t GetNativeDisplay(); |
99 | 99 |
100 // Obtains an AcceleratedWidget backed by a native Linux framebuffer. | |
101 // The returned AcceleratedWidget is an opaque token that must realized | |
102 // before it can be used to create a GL surface. | |
103 virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0; | |
104 | |
105 // Create SurfaceOzoneEGL for the specified gfx::AcceleratedWidget. | 100 // Create SurfaceOzoneEGL for the specified gfx::AcceleratedWidget. |
106 // | 101 // |
107 // Note: When used from content, this is called in the GPU process. The | 102 // Note: When used from content, this is called in the GPU process. The |
108 // platform must support creation of SurfaceOzoneEGL from the GPU process | 103 // platform must support creation of SurfaceOzoneEGL from the GPU process |
109 // using only the handle contained in gfx::AcceleratedWidget. | 104 // using only the handle contained in gfx::AcceleratedWidget. |
110 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( | 105 virtual scoped_ptr<SurfaceOzoneEGL> CreateEGLSurfaceForWidget( |
111 gfx::AcceleratedWidget widget); | 106 gfx::AcceleratedWidget widget); |
112 | 107 |
113 // Create SurfaceOzoneCanvas for the specified gfx::AcceleratedWidget. | 108 // Create SurfaceOzoneCanvas for the specified gfx::AcceleratedWidget. |
114 // | 109 // |
(...skipping 29 matching lines...) Expand all Loading... |
144 // overlay-only mode. | 139 // overlay-only mode. |
145 virtual bool CanShowPrimaryPlaneAsOverlay(); | 140 virtual bool CanShowPrimaryPlaneAsOverlay(); |
146 | 141 |
147 private: | 142 private: |
148 static SurfaceFactoryOzone* impl_; // not owned | 143 static SurfaceFactoryOzone* impl_; // not owned |
149 }; | 144 }; |
150 | 145 |
151 } // namespace ui | 146 } // namespace ui |
152 | 147 |
153 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ | 148 #endif // UI_OZONE_PUBLIC_SURFACE_FACTORY_OZONE_H_ |
OLD | NEW |