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

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

Issue 1253433002: Fix GL extension filtering so that extension bits are set correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean up context tls Created 5 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
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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 void Initialize(DriverGL* driver); 61 void Initialize(DriverGL* driver);
62 void InitializeWithCommandLine(DriverGL* driver, 62 void InitializeWithCommandLine(DriverGL* driver,
63 base::CommandLine* command_line); 63 base::CommandLine* command_line);
64 64
65 void InitializeWithContext(); 65 void InitializeWithContext();
66 66
67 void glGetIntegervFn(GLenum pname, GLint* params) override; 67 void glGetIntegervFn(GLenum pname, GLint* params) override;
68 const GLubyte* glGetStringFn(GLenum name) override; 68 const GLubyte* glGetStringFn(GLenum name) override;
69 const GLubyte* glGetStringiFn(GLenum name, GLuint index) override; 69 const GLubyte* glGetStringiFn(GLenum name, GLuint index) override;
70 70
71 void InitializeFilteredExtensions();
72
71 private: 73 private:
72 void InitializeFilteredExtensions();
73 void glFinishFn() override; 74 void glFinishFn() override;
74 void glFlushFn() override; 75 void glFlushFn() override;
75 76
76 // Filtered GL_EXTENSIONS we return to glGetString(i) calls. 77 // Filtered GL_EXTENSIONS we return to glGetString(i) calls.
77 std::vector<std::string> disabled_exts_; 78 std::vector<std::string> disabled_exts_;
78 std::vector<std::string> filtered_exts_; 79 std::vector<std::string> filtered_exts_;
79 std::string filtered_exts_str_; 80 std::string filtered_exts_str_;
81
82 #if DCHECK_IS_ON()
83 bool filtered_exts_initialized_;
84 #endif
80 }; 85 };
81 86
82 // Inserts a TRACE for every GL call. 87 // Inserts a TRACE for every GL call.
83 class TraceGLApi : public GLApi { 88 class TraceGLApi : public GLApi {
84 public: 89 public:
85 TraceGLApi(GLApi* gl_api) : gl_api_(gl_api) { } 90 TraceGLApi(GLApi* gl_api) : gl_api_(gl_api) { }
86 ~TraceGLApi() override; 91 ~TraceGLApi() override;
87 92
88 // Include the auto-generated part of this class. We split this because 93 // Include the auto-generated part of this class. We split this because
89 // it means we can easily edit the non-auto generated parts right here in 94 // it means we can easily edit the non-auto generated parts right here in
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 ScopedSetGLToRealGLApi(); 146 ScopedSetGLToRealGLApi();
142 ~ScopedSetGLToRealGLApi(); 147 ~ScopedSetGLToRealGLApi();
143 148
144 private: 149 private:
145 GLApi* old_gl_api_; 150 GLApi* old_gl_api_;
146 }; 151 };
147 152
148 } // namespace gfx 153 } // namespace gfx
149 154
150 #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_ 155 #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698