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

Unified Diff: ui/gl/gl_helper.cc

Issue 2094823002: gl_unittests: on a core profile, use VAOs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_helper.h ('k') | ui/gl/test/gl_image_test_template.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_helper.cc
diff --git a/ui/gl/gl_helper.cc b/ui/gl/gl_helper.cc
index 97a4e3b76f57be363ef6b289c827b383236b700a..abcab00a0aa1ed0480dfb7a45c76ee0ba08a8114 100644
--- a/ui/gl/gl_helper.cc
+++ b/ui/gl/gl_helper.cc
@@ -7,6 +7,8 @@
#include <string>
#include "base/logging.h"
+#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gl_version_info.h"
#include "ui/gl/scoped_binders.h"
namespace gl {
@@ -94,4 +96,14 @@ void GLHelper::DrawQuad(GLuint vertex_buffer) {
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
+// static
+bool GLHelper::ShouldTestsUseVAOs() {
Corentin Wallez 2016/06/23 20:00:04 AFAIK, after the GLContextGLX change this will alw
piman 2016/06/23 20:09:01 I think we still run the tests on GLES 2.0 (e.g. A
+ auto version = reinterpret_cast<const char*>(glGetString(GL_VERSION));
+ auto renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER));
+ auto extensions = gl::GetGLExtensionsFromCurrentContext();
+
+ return GLVersionInfo(version, renderer, extensions.c_str())
piman 2016/06/23 20:09:01 nit: you should be able to use GLContext::GetCurre
+ .is_desktop_core_profile;
+}
+
} // namespace gl
« no previous file with comments | « ui/gl/gl_helper.h ('k') | ui/gl/test/gl_image_test_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698