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

Side by Side Diff: ui/gl/test/gl_image_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 unified diff | Download patch
« no previous file with comments | « ui/gl/init/gl_factory_ozone.cc ('k') | ui/gl/test/gl_surface_test_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/gl/test/gl_image_test_support.h" 5 #include "ui/gl/test/gl_image_test_support.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ui/gl/gl_implementation.h" 9 #include "ui/gl/gl_implementation.h"
10 #include "ui/gl/init/gl_factory.h" 10 #include "ui/gl/init/gl_factory.h"
11 #include "ui/gl/test/gl_surface_test_support.h" 11 #include "ui/gl/test/gl_surface_test_support.h"
12 12
13 #if defined(USE_OZONE) 13 #if defined(USE_OZONE)
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "ui/ozone/public/ozone_platform.h"
15 #endif 16 #endif
16 17
17 namespace gl { 18 namespace gl {
18 19
19 // static 20 // static
20 void GLImageTestSupport::InitializeGL() { 21 void GLImageTestSupport::InitializeGL() {
22 #if defined(USE_OZONE)
23 ui::OzonePlatform::InitParams params;
24 params.single_process = true;
25 ui::OzonePlatform::InitializeForGPU(params);
26 #endif
27
21 std::vector<GLImplementation> allowed_impls = 28 std::vector<GLImplementation> allowed_impls =
22 init::GetAllowedGLImplementations(); 29 init::GetAllowedGLImplementations();
23 DCHECK(!allowed_impls.empty()); 30 DCHECK(!allowed_impls.empty());
24 31
25 GLImplementation impl = allowed_impls[0]; 32 GLImplementation impl = allowed_impls[0];
26 GLSurfaceTestSupport::InitializeOneOffImplementation(impl, true); 33 GLSurfaceTestSupport::InitializeOneOffImplementation(impl, true);
27 #if defined(USE_OZONE) 34 #if defined(USE_OZONE)
28 // Make sure all the tasks posted to the current task runner by the 35 // Make sure all the tasks posted to the current task runner by the
29 // initialization functions are run before running the tests. 36 // initialization functions are run before running the tests.
30 base::RunLoop().RunUntilIdle(); 37 base::RunLoop().RunUntilIdle();
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 case gfx::BufferFormat::ETC1: 173 case gfx::BufferFormat::ETC1:
167 case gfx::BufferFormat::RGBA_4444: 174 case gfx::BufferFormat::RGBA_4444:
168 case gfx::BufferFormat::UYVY_422: 175 case gfx::BufferFormat::UYVY_422:
169 NOTREACHED(); 176 NOTREACHED();
170 return; 177 return;
171 } 178 }
172 NOTREACHED(); 179 NOTREACHED();
173 } 180 }
174 181
175 } // namespace gl 182 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/init/gl_factory_ozone.cc ('k') | ui/gl/test/gl_surface_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698