gl_dynamic_config_unittest.cc 1.3 KB

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