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

Side by Side Diff: gpu/command_buffer/service/context_group_unittest.cc

Issue 1871613002: Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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/context_group.cc ('k') | gpu/command_buffer/service/feature_info.h » ('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 (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/context_group.h" 5 #include "gpu/command_buffer/service/context_group.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "gpu/command_buffer/common/value_state.h" 10 #include "gpu/command_buffer/common/value_state.h"
(...skipping 24 matching lines...) Expand all
35 class ContextGroupTest : public GpuServiceTest { 35 class ContextGroupTest : public GpuServiceTest {
36 public: 36 public:
37 static const bool kBindGeneratesResource = false; 37 static const bool kBindGeneratesResource = false;
38 38
39 ContextGroupTest() {} 39 ContextGroupTest() {}
40 40
41 protected: 41 protected:
42 void SetUp() override { 42 void SetUp() override {
43 GpuServiceTest::SetUp(); 43 GpuServiceTest::SetUp();
44 decoder_.reset(new MockGLES2Decoder()); 44 decoder_.reset(new MockGLES2Decoder());
45 group_ = scoped_refptr<ContextGroup>(new ContextGroup( 45 scoped_refptr<FeatureInfo> feature_info = new FeatureInfo;
46 gpu_preferences_, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 46 group_ = scoped_refptr<ContextGroup>(
47 kBindGeneratesResource)); 47 new ContextGroup(gpu_preferences_, NULL, NULL, NULL, NULL, feature_info,
48 NULL, NULL, kBindGeneratesResource));
48 } 49 }
49 50
50 GpuPreferences gpu_preferences_; 51 GpuPreferences gpu_preferences_;
51 scoped_ptr<MockGLES2Decoder> decoder_; 52 scoped_ptr<MockGLES2Decoder> decoder_;
52 scoped_refptr<ContextGroup> group_; 53 scoped_refptr<ContextGroup> group_;
53 }; 54 };
54 55
55 TEST_F(ContextGroupTest, Basic) { 56 TEST_F(ContextGroupTest, Basic) {
56 // Test it starts off uninitialized. 57 // Test it starts off uninitialized.
57 EXPECT_EQ(0u, group_->max_vertex_attribs()); 58 EXPECT_EQ(0u, group_->max_vertex_attribs());
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 EXPECT_TRUE(group_->renderbuffer_manager() == NULL); 143 EXPECT_TRUE(group_->renderbuffer_manager() == NULL);
143 EXPECT_TRUE(group_->texture_manager() == NULL); 144 EXPECT_TRUE(group_->texture_manager() == NULL);
144 EXPECT_TRUE(group_->program_manager() == NULL); 145 EXPECT_TRUE(group_->program_manager() == NULL);
145 EXPECT_TRUE(group_->shader_manager() == NULL); 146 EXPECT_TRUE(group_->shader_manager() == NULL);
146 } 147 }
147 148
148 } // namespace gles2 149 } // namespace gles2
149 } // namespace gpu 150 } // namespace gpu
150 151
151 152
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/context_group.cc ('k') | gpu/command_buffer/service/feature_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698