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

Unified Diff: gpu/command_buffer/tests/gl_tests_main.cc

Issue 1025523005: gl_tests: Use zero size gl surface for offscreen rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix multi-processed case Created 5 years, 9 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/tests/gl_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « gpu/command_buffer/tests/gl_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698