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

Side by Side Diff: ui/gl/gl_context.h

Issue 2129043003: Make dynamic mock bindings initialization consistent with other GL implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « gpu/ipc/service/gpu_channel_unittest.cc ('k') | ui/gl/gl_context.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GL_GL_CONTEXT_H_ 5 #ifndef UI_GL_GL_CONTEXT_H_
6 #define UI_GL_GL_CONTEXT_H_ 6 #define UI_GL_GL_CONTEXT_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 bool canceled_; 150 bool canceled_;
151 }; 151 };
152 152
153 // Sets the GL api to the real hardware API (vs the VirtualAPI) 153 // Sets the GL api to the real hardware API (vs the VirtualAPI)
154 static void SetRealGLApi(); 154 static void SetRealGLApi();
155 virtual void SetCurrent(GLSurface* surface); 155 virtual void SetCurrent(GLSurface* surface);
156 156
157 // Initialize function pointers to functions where the bound version depends 157 // Initialize function pointers to functions where the bound version depends
158 // on GL version or supported extensions. Should be called immediately after 158 // on GL version or supported extensions. Should be called immediately after
159 // this context is made current. 159 // this context is made current.
160 bool InitializeDynamicBindings(); 160 void InitializeDynamicBindings();
161 161
162 // Returns the last real (non-virtual) GLContext made current. 162 // Returns the last real (non-virtual) GLContext made current.
163 static GLContext* GetRealCurrent(); 163 static GLContext* GetRealCurrent();
164 164
165 virtual void OnSetSwapInterval(int interval) = 0; 165 virtual void OnSetSwapInterval(int interval) = 0;
166 166
167 private: 167 private:
168 friend class base::RefCounted<GLContext>; 168 friend class base::RefCounted<GLContext>;
169 169
170 // For GetRealCurrent. 170 // For GetRealCurrent.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 // scoped_refptr containing the initialized GLContext or nullptr if 202 // scoped_refptr containing the initialized GLContext or nullptr if
203 // initialization fails. 203 // initialization fails.
204 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( 204 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext(
205 scoped_refptr<GLContext> context, 205 scoped_refptr<GLContext> context,
206 GLSurface* compatible_surface, 206 GLSurface* compatible_surface,
207 GpuPreference gpu_preference); 207 GpuPreference gpu_preference);
208 208
209 } // namespace gl 209 } // namespace gl
210 210
211 #endif // UI_GL_GL_CONTEXT_H_ 211 #endif // UI_GL_GL_CONTEXT_H_
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_channel_unittest.cc ('k') | ui/gl/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698