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

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: build fix for win and mac, but cros need crrev.com/1208603002 Created 4 years, 11 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
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 case gfx::BufferFormat::RGBA_4444: 115 case gfx::BufferFormat::RGBA_4444:
125 case gfx::BufferFormat::UYVY_422: 116 case gfx::BufferFormat::UYVY_422:
126 case gfx::BufferFormat::YUV_420: 117 case gfx::BufferFormat::YUV_420:
127 NOTREACHED(); 118 NOTREACHED();
128 return; 119 return;
129 } 120 }
130 NOTREACHED(); 121 NOTREACHED();
131 } 122 }
132 123
133 } // namespace gl 124 } // namespace gl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698