| 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_GFX_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ | 5 #ifndef UI_GFX_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ |
| 6 #define UI_GFX_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ | 6 #define UI_GFX_OZONE_SURFACE_LNUX_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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 typedef void*(*GLGetProcAddressProc)(const char* name); | 77 typedef void*(*GLGetProcAddressProc)(const char* name); |
| 78 typedef base::Callback<void(base::NativeLibrary)> AddGLLibraryCallback; | 78 typedef base::Callback<void(base::NativeLibrary)> AddGLLibraryCallback; |
| 79 typedef base::Callback<void(GLGetProcAddressProc)> | 79 typedef base::Callback<void(GLGetProcAddressProc)> |
| 80 SetGLGetProcAddressProcCallback; | 80 SetGLGetProcAddressProcCallback; |
| 81 | 81 |
| 82 SurfaceFactoryOzone(); | 82 SurfaceFactoryOzone(); |
| 83 virtual ~SurfaceFactoryOzone(); | 83 virtual ~SurfaceFactoryOzone(); |
| 84 | 84 |
| 85 // Returns the instance | 85 // Returns the singleton instance. |
| 86 static SurfaceFactoryOzone* GetInstance(); | 86 static SurfaceFactoryOzone* GetInstance(); |
| 87 | 87 |
| 88 // Sets the implementation delegate. Ownership is retained by the caller. | |
| 89 static void SetInstance(SurfaceFactoryOzone* impl); | |
| 90 | |
| 91 // Configures the display hardware. Must be called from within the GPU | 88 // Configures the display hardware. Must be called from within the GPU |
| 92 // process before the sandbox has been activated. | 89 // process before the sandbox has been activated. |
| 93 virtual HardwareState InitializeHardware() = 0; | 90 virtual HardwareState InitializeHardware() = 0; |
| 94 | 91 |
| 95 // 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. |
| 96 // This method must be safe to run inside of the sandbox. | 93 // This method must be safe to run inside of the sandbox. |
| 97 virtual void ShutdownHardware() = 0; | 94 virtual void ShutdownHardware() = 0; |
| 98 | 95 |
| 99 // 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 |
| 100 // display connection for the native display. | 97 // display connection for the native display. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 virtual gfx::NativeBufferOzone CreateNativeBuffer(gfx::Size size, | 154 virtual gfx::NativeBufferOzone CreateNativeBuffer(gfx::Size size, |
| 158 BufferFormat format); | 155 BufferFormat format); |
| 159 | 156 |
| 160 private: | 157 private: |
| 161 static SurfaceFactoryOzone* impl_; // not owned | 158 static SurfaceFactoryOzone* impl_; // not owned |
| 162 }; | 159 }; |
| 163 | 160 |
| 164 } // namespace gfx | 161 } // namespace gfx |
| 165 | 162 |
| 166 #endif // UI_GFX_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ | 163 #endif // UI_GFX_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ |
| OLD | NEW |