Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: ui/gfx/ozone/surface_factory_ozone.h

Issue 291473002: ozone: Initialize a subsystem only if necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r270817 Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/events/ozone/event_factory_ozone.cc ('k') | ui/gfx/ozone/surface_factory_ozone.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « ui/events/ozone/event_factory_ozone.cc ('k') | ui/gfx/ozone/surface_factory_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698