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

Side by Side Diff: gpu/command_buffer/tests/gl_dynamic_config_unittest.cc

Issue 2616723002: Refactor GL surface format handling (Closed)
Patch Set: Fix copyright notice on new files Created 3 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
« no previous file with comments | « gpu/command_buffer/service/gl_surface_mock.h ('k') | gpu/ipc/in_process_command_buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "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 options.surface_format.SetRGB565();
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
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gl_surface_mock.h ('k') | gpu/ipc/in_process_command_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698