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

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

Issue 1273563002: Mac Overlays: Add GPU back-pressure (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Incorporate review feedback Created 5 years, 4 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
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_GL_API_IMPLEMENTATION_H_ 5 #ifndef UI_GL_GL_GL_API_IMPLEMENTATION_H_
6 #define UI_GL_GL_GL_API_IMPLEMENTATION_H_ 6 #define UI_GL_GL_GL_API_IMPLEMENTATION_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 18 matching lines...) Expand all
29 void InitializeDynamicGLBindingsGL(GLContext* context); 29 void InitializeDynamicGLBindingsGL(GLContext* context);
30 void InitializeDebugGLBindingsGL(); 30 void InitializeDebugGLBindingsGL();
31 void InitializeNullDrawGLBindingsGL(); 31 void InitializeNullDrawGLBindingsGL();
32 // TODO(danakj): Remove this when all test suites are using null-draw. 32 // TODO(danakj): Remove this when all test suites are using null-draw.
33 bool HasInitializedNullDrawGLBindingsGL(); 33 bool HasInitializedNullDrawGLBindingsGL();
34 bool SetNullDrawGLBindingsEnabledGL(bool enabled); 34 bool SetNullDrawGLBindingsEnabledGL(bool enabled);
35 void ClearGLBindingsGL(); 35 void ClearGLBindingsGL();
36 void SetGLToRealGLApi(); 36 void SetGLToRealGLApi();
37 void SetGLApi(GLApi* api); 37 void SetGLApi(GLApi* api);
38 void SetGLApiToNoContext(); 38 void SetGLApiToNoContext();
39 GLApi* GetCurrentGLApi();
tapted 2015/08/06 00:56:49 remove stray? (I don't think this is defined)
ccameron 2015/08/06 01:42:47 This is needed by ScopedSetGLToRealGLApi (it used
39 const GLVersionInfo* GetGLVersionInfo(); 40 const GLVersionInfo* GetGLVersionInfo();
40 41
41 class GL_EXPORT GLApiBase : public GLApi { 42 class GL_EXPORT GLApiBase : public GLApi {
42 public: 43 public:
43 // Include the auto-generated part of this class. We split this because 44 // Include the auto-generated part of this class. We split this because
44 // it means we can easily edit the non-auto generated parts right here in 45 // it means we can easily edit the non-auto generated parts right here in
45 // this file instead of having to edit some template or the code generator. 46 // this file instead of having to edit some template or the code generator.
46 #include "gl_bindings_api_autogen_gl.h" 47 #include "gl_bindings_api_autogen_gl.h"
47 48
48 protected: 49 protected:
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // The real context we're running on. 133 // The real context we're running on.
133 GLContext* real_context_; 134 GLContext* real_context_;
134 135
135 // The current virtual context. 136 // The current virtual context.
136 GLContext* current_context_; 137 GLContext* current_context_;
137 138
138 // The supported extensions being advertised for this virtual context. 139 // The supported extensions being advertised for this virtual context.
139 std::string extensions_; 140 std::string extensions_;
140 }; 141 };
141 142
142 class GL_EXPORT ScopedSetGLToRealGLApi {
143 public:
144 ScopedSetGLToRealGLApi();
145 ~ScopedSetGLToRealGLApi();
146
147 private:
148 GLApi* old_gl_api_;
149 };
150
151 } // namespace gfx 143 } // namespace gfx
152 144
153 #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_ 145 #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698