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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 typedef base::Callback<void(base::NativeLibrary)> AddGLLibraryCallback; | 58 typedef base::Callback<void(base::NativeLibrary)> AddGLLibraryCallback; |
59 typedef base::Callback<void(GLGetProcAddressProc)> | 59 typedef base::Callback<void(GLGetProcAddressProc)> |
60 SetGLGetProcAddressProcCallback; | 60 SetGLGetProcAddressProcCallback; |
61 | 61 |
62 SurfaceFactoryOzone(); | 62 SurfaceFactoryOzone(); |
63 virtual ~SurfaceFactoryOzone(); | 63 virtual ~SurfaceFactoryOzone(); |
64 | 64 |
65 // Returns the instance | 65 // Returns the instance |
66 static SurfaceFactoryOzone* GetInstance(); | 66 static SurfaceFactoryOzone* GetInstance(); |
67 | 67 |
68 // Returns a display spec as in |CreateDisplayFromSpec| for the default | |
69 // native surface. | |
70 virtual const char* DefaultDisplaySpec(); | |
71 | |
72 // Sets the implementation delegate. Ownership is retained by the caller. | 68 // Sets the implementation delegate. Ownership is retained by the caller. |
73 static void SetInstance(SurfaceFactoryOzone* impl); | 69 static void SetInstance(SurfaceFactoryOzone* impl); |
74 | 70 |
75 // TODO(rjkroege): decide how to separate screen/display stuff from SFOz | 71 // TODO(rjkroege): decide how to separate screen/display stuff from SFOz |
76 // This method implements gfx::Screen, particularly useful in Desktop Aura. | 72 // This method implements gfx::Screen, particularly useful in Desktop Aura. |
77 virtual gfx::Screen* CreateDesktopScreen(); | 73 virtual gfx::Screen* CreateDesktopScreen(); |
78 | 74 |
79 // Configures the display hardware. Must be called from within the GPU | 75 // Configures the display hardware. Must be called from within the GPU |
80 // process before the sandbox has been activated. | 76 // process before the sandbox has been activated. |
81 virtual HardwareState InitializeHardware() = 0; | 77 virtual HardwareState InitializeHardware() = 0; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 // caller. desired_list contains list of desired EGL properties and values. | 133 // caller. desired_list contains list of desired EGL properties and values. |
138 virtual const int32* GetEGLSurfaceProperties(const int32* desired_list); | 134 virtual const int32* GetEGLSurfaceProperties(const int32* desired_list); |
139 | 135 |
140 private: | 136 private: |
141 static SurfaceFactoryOzone* impl_; // not owned | 137 static SurfaceFactoryOzone* impl_; // not owned |
142 }; | 138 }; |
143 | 139 |
144 } // namespace gfx | 140 } // namespace gfx |
145 | 141 |
146 #endif // UI_GFX_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ | 142 #endif // UI_GFX_OZONE_SURFACE_LNUX_FACTORY_OZONE_H_ |
OLD | NEW |