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

Unified Diff: ui/gl/test/gl_surface_test_support.cc

Issue 2749873002: Move Ozone GPU initialization. (Closed)
Patch Set: Fixes. Created 3 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 | « ui/gl/test/gl_image_test_support.cc ('k') | ui/ozone/public/ozone_platform.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/test/gl_surface_test_support.cc
diff --git a/ui/gl/test/gl_surface_test_support.cc b/ui/gl/test/gl_surface_test_support.cc
index 272e0fd7a96e24dc942d2970bf0cac9abd88a00b..dcfd5cae87bd27e9d8d4557f37bba3673a69e67a 100644
--- a/ui/gl/test/gl_surface_test_support.cc
+++ b/ui/gl/test/gl_surface_test_support.cc
@@ -32,6 +32,13 @@ void GLSurfaceTestSupport::InitializeOneOff() {
#if defined(USE_X11)
XInitThreads();
#endif
+
+#if defined(USE_OZONE)
+ ui::OzonePlatform::InitParams params;
+ params.single_process = true;
+ ui::OzonePlatform::InitializeForGPU(params);
+#endif
+
ui::test::EnableTestConfigForPlatformWindows();
bool use_software_gl = true;
@@ -88,17 +95,21 @@ void GLSurfaceTestSupport::InitializeOneOffImplementation(
// static
void GLSurfaceTestSupport::InitializeOneOffWithMockBindings() {
#if defined(USE_OZONE)
- // This function skips where Ozone is otherwise initialized.
- ui::OzonePlatform::InitializeForGPU();
+ ui::OzonePlatform::InitParams params;
+ params.single_process = true;
+ ui::OzonePlatform::InitializeForGPU(params);
#endif
+
InitializeOneOffImplementation(kGLImplementationMockGL, false);
}
void GLSurfaceTestSupport::InitializeOneOffWithStubBindings() {
#if defined(USE_OZONE)
- // This function skips where Ozone is otherwise initialized.
- ui::OzonePlatform::InitializeForGPU();
+ ui::OzonePlatform::InitParams params;
+ params.single_process = true;
+ ui::OzonePlatform::InitializeForGPU(params);
#endif
+
InitializeOneOffImplementation(kGLImplementationStubGL, false);
}
« no previous file with comments | « ui/gl/test/gl_image_test_support.cc ('k') | ui/ozone/public/ozone_platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698