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/service/gles2_cmd_decoder_unittest_base.cc

Issue 2378583003: Ping watchdog thread during GpuChannel destruction (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/string_split.h" 16 #include "base/strings/string_split.h"
17 #include "gpu/command_buffer/common/gles2_cmd_format.h" 17 #include "gpu/command_buffer/common/gles2_cmd_format.h"
18 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 18 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
19 #include "gpu/command_buffer/service/cmd_buffer_engine.h" 19 #include "gpu/command_buffer/service/cmd_buffer_engine.h"
20 #include "gpu/command_buffer/service/context_group.h" 20 #include "gpu/command_buffer/service/context_group.h"
21 #include "gpu/command_buffer/service/logger.h" 21 #include "gpu/command_buffer/service/logger.h"
22 #include "gpu/command_buffer/service/mailbox_manager.h" 22 #include "gpu/command_buffer/service/mailbox_manager.h"
23 #include "gpu/command_buffer/service/program_manager.h" 23 #include "gpu/command_buffer/service/program_manager.h"
24 #include "gpu/command_buffer/service/progress_reporter.h"
24 #include "gpu/command_buffer/service/test_helper.h" 25 #include "gpu/command_buffer/service/test_helper.h"
25 #include "gpu/command_buffer/service/vertex_attrib_manager.h" 26 #include "gpu/command_buffer/service/vertex_attrib_manager.h"
26 #include "testing/gtest/include/gtest/gtest.h" 27 #include "testing/gtest/include/gtest/gtest.h"
27 #include "ui/gl/gl_mock.h" 28 #include "ui/gl/gl_mock.h"
28 #include "ui/gl/init/gl_factory.h" 29 #include "ui/gl/init/gl_factory.h"
29 #include "ui/gl/test/gl_surface_test_support.h" 30 #include "ui/gl/test/gl_surface_test_support.h"
30 31
31 using ::gl::MockGLInterface; 32 using ::gl::MockGLInterface;
32 using ::testing::_; 33 using ::testing::_;
33 using ::testing::AnyNumber; 34 using ::testing::AnyNumber;
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 ::gl::MockGLInterface::SetGLInterface(gl_.get()); 187 ::gl::MockGLInterface::SetGLInterface(gl_.get());
187 188
188 SetupMockGLBehaviors(); 189 SetupMockGLBehaviors();
189 190
190 scoped_refptr<FeatureInfo> feature_info = new FeatureInfo; 191 scoped_refptr<FeatureInfo> feature_info = new FeatureInfo;
191 if (command_line) { 192 if (command_line) {
192 GpuDriverBugWorkarounds gpu_driver_bug_workaround(command_line); 193 GpuDriverBugWorkarounds gpu_driver_bug_workaround(command_line);
193 feature_info = new FeatureInfo(*command_line, gpu_driver_bug_workaround); 194 feature_info = new FeatureInfo(*command_line, gpu_driver_bug_workaround);
194 } 195 }
195 196
196 group_ = scoped_refptr<ContextGroup>( 197 group_ = scoped_refptr<ContextGroup>(new ContextGroup(
197 new ContextGroup(gpu_preferences_, NULL, memory_tracker_, 198 gpu_preferences_, NULL, memory_tracker_,
198 new ShaderTranslatorCache(gpu_preferences_), 199 new ShaderTranslatorCache(gpu_preferences_),
199 new FramebufferCompletenessCache, feature_info, 200 new FramebufferCompletenessCache, feature_info,
200 normalized_init.bind_generates_resource, nullptr)); 201 normalized_init.bind_generates_resource, nullptr, nullptr));
201 bool use_default_textures = normalized_init.bind_generates_resource; 202 bool use_default_textures = normalized_init.bind_generates_resource;
202 203
203 InSequence sequence; 204 InSequence sequence;
204 205
205 surface_ = new gl::GLSurfaceStub; 206 surface_ = new gl::GLSurfaceStub;
206 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight)); 207 surface_->SetSize(gfx::Size(kBackBufferWidth, kBackBufferHeight));
207 208
208 // Context needs to be created before initializing ContextGroup, which will 209 // Context needs to be created before initializing ContextGroup, which will
209 // in turn initialize FeatureInfo, which needs a context to determine 210 // in turn initialize FeatureInfo, which needs a context to determine
210 // extension support. 211 // extension support.
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 SetupDefaultProgram(); 2124 SetupDefaultProgram();
2124 } 2125 }
2125 2126
2126 // Include the auto-generated part of this file. We split this because it means 2127 // Include the auto-generated part of this file. We split this because it means
2127 // we can easily edit the non-auto generated parts right here in this file 2128 // we can easily edit the non-auto generated parts right here in this file
2128 // instead of having to edit some template or the code generator. 2129 // instead of having to edit some template or the code generator.
2129 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h" 2130 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_0_autogen.h"
2130 2131
2131 } // namespace gles2 2132 } // namespace gles2
2132 } // namespace gpu 2133 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698