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

Side by Side Diff: ui/gl/test/gl_image_test_support.cc

Issue 1998723002: Move code in ui/gl/* from gfx:: to gl:: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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/test/egl_initialization_displays_unittest.cc ('k') | ui/gl/test/gl_image_test_template.h » ('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/test/gl_surface_test_support.h" 10 #include "ui/gl/test/gl_surface_test_support.h"
11 11
12 #if defined(USE_OZONE) 12 #if defined(USE_OZONE)
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #endif 14 #endif
15 15
16 namespace gl { 16 namespace gl {
17 17
18 // static 18 // static
19 void GLImageTestSupport::InitializeGL() { 19 void GLImageTestSupport::InitializeGL() {
20 20 std::vector<gl::GLImplementation> allowed_impls;
21 std::vector<gfx::GLImplementation> allowed_impls;
22 GetAllowedGLImplementations(&allowed_impls); 21 GetAllowedGLImplementations(&allowed_impls);
23 DCHECK(!allowed_impls.empty()); 22 DCHECK(!allowed_impls.empty());
24 23
25 gfx::GLImplementation impl = allowed_impls[0]; 24 gl::GLImplementation impl = allowed_impls[0];
26 gfx::GLSurfaceTestSupport::InitializeOneOffImplementation(impl, true); 25 gl::GLSurfaceTestSupport::InitializeOneOffImplementation(impl, true);
27 #if defined(USE_OZONE) 26 #if defined(USE_OZONE)
28 // Make sure all the tasks posted to the current task runner by the 27 // Make sure all the tasks posted to the current task runner by the
29 // initialization functions are run before running the tests. 28 // initialization functions are run before running the tests.
30 base::RunLoop().RunUntilIdle(); 29 base::RunLoop().RunUntilIdle();
31 #endif 30 #endif
32 } 31 }
33 32
34 // static 33 // static
35 void GLImageTestSupport::CleanupGL() { 34 void GLImageTestSupport::CleanupGL() {
36 gfx::ClearGLBindings(); 35 gl::ClearGLBindings();
37 } 36 }
38 37
39 // static 38 // static
40 void GLImageTestSupport::SetBufferDataToColor(int width, 39 void GLImageTestSupport::SetBufferDataToColor(int width,
41 int height, 40 int height,
42 int stride, 41 int stride,
43 int plane, 42 int plane,
44 gfx::BufferFormat format, 43 gfx::BufferFormat format,
45 const uint8_t color[4], 44 const uint8_t color[4],
46 uint8_t* data) { 45 uint8_t* data) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 case gfx::BufferFormat::RGBA_4444: 134 case gfx::BufferFormat::RGBA_4444:
136 case gfx::BufferFormat::UYVY_422: 135 case gfx::BufferFormat::UYVY_422:
137 case gfx::BufferFormat::YUV_420: 136 case gfx::BufferFormat::YUV_420:
138 NOTREACHED(); 137 NOTREACHED();
139 return; 138 return;
140 } 139 }
141 NOTREACHED(); 140 NOTREACHED();
142 } 141 }
143 142
144 } // namespace gl 143 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/test/egl_initialization_displays_unittest.cc ('k') | ui/gl/test/gl_image_test_template.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698