Index: gpu/command_buffer/tests/gl_tests_main.cc |
diff --git a/gpu/command_buffer/tests/gl_tests_main.cc b/gpu/command_buffer/tests/gl_tests_main.cc |
index 7b7d8d86ec25bae20b598c517991b0fa637bca28..c725387cfb06e40da20b8826f230f15a2faa4a56 100644 |
--- a/gpu/command_buffer/tests/gl_tests_main.cc |
+++ b/gpu/command_buffer/tests/gl_tests_main.cc |
@@ -15,6 +15,9 @@ |
#include "gpu/config/gpu_util.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "ui/gl/gl_surface.h" |
+#if defined(USE_OZONE) |
+#include "ui/ozone/public/ozone_platform.h" |
+#endif |
#if defined(OS_ANDROID) |
#include "base/android/jni_android.h" |
@@ -24,7 +27,14 @@ |
namespace { |
int RunHelper(base::TestSuite* testSuite) { |
+#if defined(USE_OZONE) |
+ base::MessageLoopForUI main_loop; |
+ ui::OzonePlatform::InitializeForUI(); |
+ ui::OzonePlatform::InitializeForGPU(); |
+ gfx::GLSurface::InitializeOneOff(); |
+#else |
base::MessageLoopForIO message_loop; |
+#endif |
return testSuite->Run(); |
} |
@@ -39,8 +49,10 @@ int main(int argc, char** argv) { |
#if defined(OS_MACOSX) |
base::mac::ScopedNSAutoreleasePool pool; |
#endif |
+#if !defined(USE_OZONE) |
gfx::GLSurface::InitializeOneOff(); |
::gles2::Initialize(); |
+#endif |
piman
2015/03/26 20:50:13
This concerns me slightly because ApplyGpuDriverBu
vignatti (out of this project)
2015/03/26 21:18:28
I tried to be conservative and not tackle other OS
piman
2015/03/26 21:32:49
Why would InitializeOneOff run twice?
vignatti (out of this project)
2015/03/27 16:00:16
I'm not sure how the batch logic works, but the Ru
|
gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess()); |
testing::InitGoogleMock(&argc, argv); |
return base::LaunchUnitTestsSerially( |