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

Unified Diff: gpu/command_buffer/service/gpu_service_test.cc

Issue 331293003: Add common GLFence::IsSupported() check (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | « gpu/command_buffer/service/gpu_service_test.h ('k') | ui/gl/gl_fence.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gpu_service_test.cc
diff --git a/gpu/command_buffer/service/gpu_service_test.cc b/gpu/command_buffer/service/gpu_service_test.cc
index a51a54c7a4879a2ff14e0cd722b74100009a6f9e..8d62b5ab5e554045a8bdb093ad5904260ee2e8ff 100644
--- a/gpu/command_buffer/service/gpu_service_test.cc
+++ b/gpu/command_buffer/service/gpu_service_test.cc
@@ -21,7 +21,8 @@ GpuServiceTest::~GpuServiceTest() {
DCHECK(ran_teardown_);
}
-void GpuServiceTest::SetUp() {
+void GpuServiceTest::SetUpWithGLVersion(const char* gl_version,
+ const char* gl_extensions) {
testing::Test::SetUp();
gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress);
@@ -30,12 +31,16 @@ void GpuServiceTest::SetUp() {
::gfx::MockGLInterface::SetGLInterface(gl_.get());
context_ = new gfx::GLContextStubWithExtensions;
- context_->AddExtensionsString(NULL);
- context_->SetGLVersionString("3.0");
+ context_->AddExtensionsString(gl_extensions);
+ context_->SetGLVersionString(gl_version);
gfx::GLSurface::InitializeDynamicMockBindingsForTests(context_);
ran_setup_ = true;
}
+void GpuServiceTest::SetUp() {
+ SetUpWithGLVersion("2.0", NULL);
+}
+
void GpuServiceTest::TearDown() {
DCHECK(ran_setup_);
::gfx::MockGLInterface::SetGLInterface(NULL);
« no previous file with comments | « gpu/command_buffer/service/gpu_service_test.h ('k') | ui/gl/gl_fence.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698