OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/service/gles2_cmd_decoder_unittest_base.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
13 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 13 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
14 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 14 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 15 #include "gpu/command_buffer/common/value_state.h" |
15 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 16 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
16 #include "gpu/command_buffer/service/context_group.h" | 17 #include "gpu/command_buffer/service/context_group.h" |
17 #include "gpu/command_buffer/service/logger.h" | 18 #include "gpu/command_buffer/service/logger.h" |
18 #include "gpu/command_buffer/service/mailbox_manager.h" | 19 #include "gpu/command_buffer/service/mailbox_manager.h" |
19 #include "gpu/command_buffer/service/program_manager.h" | 20 #include "gpu/command_buffer/service/program_manager.h" |
20 #include "gpu/command_buffer/service/test_helper.h" | 21 #include "gpu/command_buffer/service/test_helper.h" |
21 #include "gpu/command_buffer/service/vertex_attrib_manager.h" | 22 #include "gpu/command_buffer/service/vertex_attrib_manager.h" |
22 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
23 #include "ui/gl/gl_implementation.h" | 24 #include "ui/gl/gl_implementation.h" |
24 #include "ui/gl/gl_mock.h" | 25 #include "ui/gl/gl_mock.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 std::vector<std::string> list; | 167 std::vector<std::string> list; |
167 base::SplitString(normalized_init.extensions, ' ', &list); | 168 base::SplitString(normalized_init.extensions, ' ', &list); |
168 scoped_refptr<FeatureInfo> feature_info; | 169 scoped_refptr<FeatureInfo> feature_info; |
169 if (command_line) | 170 if (command_line) |
170 feature_info = new FeatureInfo(*command_line); | 171 feature_info = new FeatureInfo(*command_line); |
171 group_ = scoped_refptr<ContextGroup>( | 172 group_ = scoped_refptr<ContextGroup>( |
172 new ContextGroup(NULL, | 173 new ContextGroup(NULL, |
173 memory_tracker_, | 174 memory_tracker_, |
174 new ShaderTranslatorCache, | 175 new ShaderTranslatorCache, |
175 feature_info.get(), | 176 feature_info.get(), |
| 177 new ValueStateMap, |
176 normalized_init.bind_generates_resource)); | 178 normalized_init.bind_generates_resource)); |
177 bool use_default_textures = normalized_init.bind_generates_resource; | 179 bool use_default_textures = normalized_init.bind_generates_resource; |
178 | 180 |
179 InSequence sequence; | 181 InSequence sequence; |
180 | 182 |
181 surface_ = new gfx::GLSurfaceStub; | 183 surface_ = new gfx::GLSurfaceStub; |
182 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); | 184 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); |
183 | 185 |
184 // Context needs to be created before initializing ContextGroup, which will | 186 // Context needs to be created before initializing ContextGroup, which will |
185 // in turn initialize FeatureInfo, which needs a context to determine | 187 // in turn initialize FeatureInfo, which needs a context to determine |
(...skipping 1484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1670 SetupDefaultProgram(); | 1672 SetupDefaultProgram(); |
1671 } | 1673 } |
1672 | 1674 |
1673 // Include the auto-generated part of this file. We split this because it means | 1675 // Include the auto-generated part of this file. We split this because it means |
1674 // we can easily edit the non-auto generated parts right here in this file | 1676 // we can easily edit the non-auto generated parts right here in this file |
1675 // instead of having to edit some template or the code generator. | 1677 // instead of having to edit some template or the code generator. |
1676 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" | 1678 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" |
1677 | 1679 |
1678 } // namespace gles2 | 1680 } // namespace gles2 |
1679 } // namespace gpu | 1681 } // namespace gpu |
OLD | NEW |