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

Unified Diff: gpu/command_buffer/service/program_manager_unittest.cc

Issue 2378583003: Ping watchdog thread during GpuChannel destruction (Closed)
Patch Set: Fix lifetime and use nullptr 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/program_manager_unittest.cc
diff --git a/gpu/command_buffer/service/program_manager_unittest.cc b/gpu/command_buffer/service/program_manager_unittest.cc
index 196c979c4d67f398d599e2c25cbfa2884f8d1ca5..b6f19e224f866284f838e344ecdf095d86c769ea 100644
--- a/gpu/command_buffer/service/program_manager_unittest.cc
+++ b/gpu/command_buffer/service/program_manager_unittest.cc
@@ -59,12 +59,9 @@ uint32_t ComputeOffset(const void* start, const void* position) {
class ProgramManagerTestBase : public GpuServiceTest {
protected:
virtual void SetupProgramManager() {
- manager_.reset(new ProgramManager(nullptr, kMaxVaryingVectors,
- kMaxDrawBuffers,
- kMaxDualSourceDrawBuffers,
- kMaxVertexAttribs,
- gpu_preferences_,
- feature_info_.get()));
+ manager_.reset(new ProgramManager(
+ nullptr, kMaxVaryingVectors, kMaxDrawBuffers, kMaxDualSourceDrawBuffers,
+ kMaxVertexAttribs, gpu_preferences_, feature_info_.get(), nullptr));
}
void SetUpBase(const char* gl_version,
const char* gl_extensions,
@@ -131,7 +128,7 @@ TEST_F(ProgramManagerTest, Destroy) {
}
TEST_F(ProgramManagerTest, DeleteBug) {
- ShaderManager shader_manager;
+ ShaderManager shader_manager(nullptr);
const GLuint kClient1Id = 1;
const GLuint kClient2Id = 2;
const GLuint kService1Id = 11;
@@ -238,6 +235,8 @@ class ProgramManagerWithShaderTest : public ProgramManagerTestBase {
static const size_t kNumAttribs;
static const size_t kNumUniforms;
+ ProgramManagerWithShaderTest() : shader_manager_(nullptr) {}
+
protected:
typedef TestHelper::AttribInfo AttribInfo;
typedef TestHelper::UniformInfo UniformInfo;
@@ -2064,19 +2063,17 @@ class ProgramManagerWithCacheTest : public ProgramManagerTestBase {
ProgramManagerWithCacheTest()
: cache_(new MockProgramCache()),
- vertex_shader_(NULL),
- fragment_shader_(NULL),
- program_(NULL) {
- }
+ vertex_shader_(nullptr),
+ fragment_shader_(nullptr),
+ program_(nullptr),
+ shader_manager_(nullptr) {}
protected:
void SetupProgramManager() override {
- manager_.reset(new ProgramManager(cache_.get(), kMaxVaryingVectors,
- kMaxDrawBuffers,
- kMaxDualSourceDrawBuffers,
- kMaxVertexAttribs,
- gpu_preferences_,
- feature_info_.get()));
+ manager_.reset(
+ new ProgramManager(cache_.get(), kMaxVaryingVectors, kMaxDrawBuffers,
+ kMaxDualSourceDrawBuffers, kMaxVertexAttribs,
+ gpu_preferences_, feature_info_.get(), nullptr));
}
void SetUp() override {

Powered by Google App Engine
This is Rietveld 408576698