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

Side by Side Diff: gpu/command_buffer/service/buffer_manager_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 | « components/mus/gles2/gpu_state.cc ('k') | gpu/command_buffer/service/context_group.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 (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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include "gpu/command_buffer/service/buffer_manager.h" 8 #include "gpu/command_buffer/service/buffer_manager.h"
9 #include "gpu/command_buffer/service/error_state_mock.h" 9 #include "gpu/command_buffer/service/error_state_mock.h"
10 #include "gpu/command_buffer/service/feature_info.h" 10 #include "gpu/command_buffer/service/feature_info.h"
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 mock_memory_tracker_ = new StrictMock<MockMemoryTracker>(); 241 mock_memory_tracker_ = new StrictMock<MockMemoryTracker>();
242 SetUpBase(mock_memory_tracker_.get(), NULL, ""); 242 SetUpBase(mock_memory_tracker_.get(), NULL, "");
243 } 243 }
244 244
245 scoped_refptr<MockMemoryTracker> mock_memory_tracker_; 245 scoped_refptr<MockMemoryTracker> mock_memory_tracker_;
246 }; 246 };
247 247
248 class BufferManagerClientSideArraysTest : public BufferManagerTestBase { 248 class BufferManagerClientSideArraysTest : public BufferManagerTestBase {
249 protected: 249 protected:
250 void SetUp() override { 250 void SetUp() override {
251 feature_info_ = new FeatureInfo(); 251 GpuDriverBugWorkarounds gpu_driver_bug_workarounds;
252 feature_info_->workarounds_.use_client_side_arrays_for_stream_buffers = 252 gpu_driver_bug_workarounds.use_client_side_arrays_for_stream_buffers = true;
253 true; 253 feature_info_ = new FeatureInfo(gpu_driver_bug_workarounds);
254 SetUpBase(NULL, feature_info_.get(), ""); 254 SetUpBase(NULL, feature_info_.get(), "");
255 } 255 }
256 256
257 scoped_refptr<FeatureInfo> feature_info_; 257 scoped_refptr<FeatureInfo> feature_info_;
258 }; 258 };
259 259
260 #define EXPECT_MEMORY_ALLOCATION_CHANGE(old_size, new_size) \ 260 #define EXPECT_MEMORY_ALLOCATION_CHANGE(old_size, new_size) \
261 EXPECT_CALL(*mock_memory_tracker_.get(), \ 261 EXPECT_CALL(*mock_memory_tracker_.get(), \
262 TrackMemoryAllocatedChange(old_size, new_size)) \ 262 TrackMemoryAllocatedChange(old_size, new_size)) \
263 .Times(1).RetiresOnSaturation() 263 .Times(1).RetiresOnSaturation()
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 EXPECT_TRUE(manager_->SetTarget(buffer, kTargets[jj])); 566 EXPECT_TRUE(manager_->SetTarget(buffer, kTargets[jj]));
567 } 567 }
568 } 568 }
569 } 569 }
570 } 570 }
571 571
572 } // namespace gles2 572 } // namespace gles2
573 } // namespace gpu 573 } // namespace gpu
574 574
575 575
OLDNEW
« no previous file with comments | « components/mus/gles2/gpu_state.cc ('k') | gpu/command_buffer/service/context_group.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698