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

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

Issue 1484473003: gl, ozone: enable GLImageBindTest unittests Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
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)
13 #include "base/message_loop/message_loop.h"
14 #endif
15
16 namespace gl { 12 namespace gl {
17 13
18 // static 14 // static
19 void GLImageTestSupport::InitializeGL() { 15 void GLImageTestSupport::InitializeGL() {
20 #if defined(USE_OZONE)
21 // On Ozone, the backend initializes the event system using a UI thread.
22 base::MessageLoopForUI main_loop;
23 #endif
24
25 std::vector<gfx::GLImplementation> allowed_impls; 16 std::vector<gfx::GLImplementation> allowed_impls;
26 GetAllowedGLImplementations(&allowed_impls); 17 GetAllowedGLImplementations(&allowed_impls);
27 DCHECK(!allowed_impls.empty()); 18 DCHECK(!allowed_impls.empty());
28 19
29 gfx::GLImplementation impl = allowed_impls[0]; 20 gfx::GLImplementation impl = allowed_impls[0];
30 gfx::GLSurfaceTestSupport::InitializeOneOffImplementation(impl, true); 21 gfx::GLSurfaceTestSupport::InitializeOneOffImplementation(impl, true);
31 } 22 }
32 23
33 // static 24 // static
34 void GLImageTestSupport::CleanupGL() { 25 void GLImageTestSupport::CleanupGL() {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 case gfx::BufferFormat::UYVY_422: 84 case gfx::BufferFormat::UYVY_422:
94 case gfx::BufferFormat::YUV_420_BIPLANAR: 85 case gfx::BufferFormat::YUV_420_BIPLANAR:
95 case gfx::BufferFormat::YUV_420: 86 case gfx::BufferFormat::YUV_420:
96 NOTREACHED(); 87 NOTREACHED();
97 return; 88 return;
98 } 89 }
99 NOTREACHED(); 90 NOTREACHED();
100 } 91 }
101 92
102 } // namespace gl 93 } // namespace gl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698