| 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 = gl::GLSurface::SURFACE_RGB565; | 21 // TODO(klausw,jinsukkim): This modification is untested, |
| 22 // GLManager::Options does not currently have a surface_format |
| 23 // field. |
| 24 options.surface_format = gl::GLSurfaceFormat( |
| 25 gl::GLSurfaceFormat::SURFACE_RGB565); |
| 22 GLManager gl_rgb_565; | 26 GLManager gl_rgb_565; |
| 23 gl_rgb_565.Initialize(options); | 27 gl_rgb_565.Initialize(options); |
| 24 | 28 |
| 25 // The test is successful if the following command returns without assertion | 29 // The test is successful if the following command returns without assertion |
| 26 // failure. Otherwise it would have stopped in GLManager while initializing | 30 // failure. Otherwise it would have stopped in GLManager while initializing |
| 27 // the context and making it current. | 31 // the context and making it current. |
| 28 GLManager gl_argb_8888; | 32 GLManager gl_argb_8888; |
| 29 gl_argb_8888.Initialize(GLManager::Options()); | 33 gl_argb_8888.Initialize(GLManager::Options()); |
| 30 | 34 |
| 31 gl_rgb_565.Destroy(); | 35 gl_rgb_565.Destroy(); |
| 32 gl_argb_8888.Destroy(); | 36 gl_argb_8888.Destroy(); |
| 33 #endif | 37 #endif |
| 34 } | 38 } |
| 35 | 39 |
| 36 } // namespace gpu | 40 } // namespace gpu |
| OLD | NEW |