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

Unified Diff: ui/gl/gl_context_mock_version.h

Issue 94963003: Take GL version and extensions correctly into account when binding functions (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed nits Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: ui/gl/gl_context_mock_version.h
diff --git a/ui/gl/gl_context_mock_version.h b/ui/gl/gl_context_mock_version.h
new file mode 100644
index 0000000000000000000000000000000000000000..73d4f23999844e1f72a29da7e95c530b2390b9c9
--- /dev/null
+++ b/ui/gl/gl_context_mock_version.h
@@ -0,0 +1,30 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GL_GL_CONTEXT_MOCK_VERSION_H_
+#define UI_GL_GL_CONTEXT_MOCK_VERSION_H_
+
+#include "ui/gl/gl_context_stub.h"
+
+namespace gfx {
+
+// A GLContext that only reports its version for unit tests.
+class GL_EXPORT GLContextMockVersion : public GLContextStub {
+ public:
+ explicit GLContextMockVersion(const char* version_str);
+
+ protected:
+ virtual std::string GetGLVersion() OVERRIDE;
+
+ virtual ~GLContextMockVersion();
+
+ private:
+ const char* version_str_;
+
+ DISALLOW_COPY_AND_ASSIGN(GLContextMockVersion);
+};
+
+} // namespace gfx
+
+#endif // UI_GL_GL_CONTEXT_MOCK_VERSION_H_

Powered by Google App Engine
This is Rietveld 408576698