OLD | NEW |
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 "gpu/command_buffer/tests/gl_manager.h" | 5 #include "gpu/command_buffer/tests/gl_manager.h" |
6 #include "testing/gmock/include/gmock/gmock.h" | 6 #include "testing/gmock/include/gmock/gmock.h" |
7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
8 | 8 |
9 namespace gpu { | 9 namespace gpu { |
10 | 10 |
11 class GLDynamicConfigTest : public testing::Test { | 11 class GLDynamicConfigTest : public testing::Test { |
12 }; | 12 }; |
13 | 13 |
14 TEST_F(GLDynamicConfigTest, SwitchConfigurationInNonVirtualizedContextMode) { | 14 TEST_F(GLDynamicConfigTest, SwitchConfigurationInNonVirtualizedContextMode) { |
15 // TODO(jinsukkim): Enable the test once crbug.com/527126 is handled. | 15 // TODO(jinsukkim): Enable the test once crbug.com/527126 is handled. |
16 #if 0 | 16 #if 0 |
17 // Disable usage of virtualized GL context. | 17 // Disable usage of virtualized GL context. |
18 GLManager::SetEnableVirtualContext(false); | 18 GLManager::SetEnableVirtualContext(false); |
19 | 19 |
20 GLManager::Options options; | 20 GLManager::Options options; |
21 options.surface_format = gfx::GLSurface::SURFACE_RGB565; | 21 options.surface_format = gl::GLSurface::SURFACE_RGB565; |
22 GLManager gl_rgb_565; | 22 GLManager gl_rgb_565; |
23 gl_rgb_565.Initialize(options); | 23 gl_rgb_565.Initialize(options); |
24 | 24 |
25 // The test is successful if the following command returns without assertion | 25 // The test is successful if the following command returns without assertion |
26 // failure. Otherwise it would have stopped in GLManager while initializing | 26 // failure. Otherwise it would have stopped in GLManager while initializing |
27 // the context and making it current. | 27 // the context and making it current. |
28 GLManager gl_argb_8888; | 28 GLManager gl_argb_8888; |
29 gl_argb_8888.Initialize(GLManager::Options()); | 29 gl_argb_8888.Initialize(GLManager::Options()); |
30 | 30 |
31 gl_rgb_565.Destroy(); | 31 gl_rgb_565.Destroy(); |
32 gl_argb_8888.Destroy(); | 32 gl_argb_8888.Destroy(); |
33 #endif | 33 #endif |
34 } | 34 } |
35 | 35 |
36 } // namespace gpu | 36 } // namespace gpu |
OLD | NEW |