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

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

Issue 2014223002: Follow-up fixes to changing namespace gfx to gl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 6 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/gpu_timing_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 std::vector<gl::GLImplementation> allowed_impls; 20 std::vector<GLImplementation> allowed_impls;
21 GetAllowedGLImplementations(&allowed_impls); 21 GetAllowedGLImplementations(&allowed_impls);
22 DCHECK(!allowed_impls.empty()); 22 DCHECK(!allowed_impls.empty());
23 23
24 gl::GLImplementation impl = allowed_impls[0]; 24 GLImplementation impl = allowed_impls[0];
25 gl::GLSurfaceTestSupport::InitializeOneOffImplementation(impl, true); 25 GLSurfaceTestSupport::InitializeOneOffImplementation(impl, true);
26 #if defined(USE_OZONE) 26 #if defined(USE_OZONE)
27 // 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
28 // initialization functions are run before running the tests. 28 // initialization functions are run before running the tests.
29 base::RunLoop().RunUntilIdle(); 29 base::RunLoop().RunUntilIdle();
30 #endif 30 #endif
31 } 31 }
32 32
33 // static 33 // static
34 void GLImageTestSupport::CleanupGL() { 34 void GLImageTestSupport::CleanupGL() {
35 gl::ClearGLBindings(); 35 ClearGLBindings();
36 } 36 }
37 37
38 // static 38 // static
39 void GLImageTestSupport::SetBufferDataToColor(int width, 39 void GLImageTestSupport::SetBufferDataToColor(int width,
40 int height, 40 int height,
41 int stride, 41 int stride,
42 int plane, 42 int plane,
43 gfx::BufferFormat format, 43 gfx::BufferFormat format,
44 const uint8_t color[4], 44 const uint8_t color[4],
45 uint8_t* data) { 45 uint8_t* data) {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 case gfx::BufferFormat::RGBA_4444: 134 case gfx::BufferFormat::RGBA_4444:
135 case gfx::BufferFormat::UYVY_422: 135 case gfx::BufferFormat::UYVY_422:
136 case gfx::BufferFormat::YUV_420: 136 case gfx::BufferFormat::YUV_420:
137 NOTREACHED(); 137 NOTREACHED();
138 return; 138 return;
139 } 139 }
140 NOTREACHED(); 140 NOTREACHED();
141 } 141 }
142 142
143 } // namespace gl 143 } // namespace gl
OLDNEW
« no previous file with comments | « ui/gl/gpu_timing_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