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

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: 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
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::Initialize(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 =
253 true; 253 true;
254 feature_info_ = new FeatureInfo(gpu_driver_bug_workarounds_);
254 SetUpBase(NULL, feature_info_.get(), ""); 255 SetUpBase(NULL, feature_info_.get(), "");
255 } 256 }
256 257
257 scoped_refptr<FeatureInfo> feature_info_; 258 scoped_refptr<FeatureInfo> feature_info_;
258 }; 259 };
259 260
260 #define EXPECT_MEMORY_ALLOCATION_CHANGE(old_size, new_size) \ 261 #define EXPECT_MEMORY_ALLOCATION_CHANGE(old_size, new_size) \
261 EXPECT_CALL(*mock_memory_tracker_.get(), \ 262 EXPECT_CALL(*mock_memory_tracker_.get(), \
262 TrackMemoryAllocatedChange(old_size, new_size)) \ 263 TrackMemoryAllocatedChange(old_size, new_size)) \
263 .Times(1).RetiresOnSaturation() 264 .Times(1).RetiresOnSaturation()
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 EXPECT_TRUE(manager_->SetTarget(buffer, kTargets[jj])); 567 EXPECT_TRUE(manager_->SetTarget(buffer, kTargets[jj]));
567 } 568 }
568 } 569 }
569 } 570 }
570 } 571 }
571 572
572 } // namespace gles2 573 } // namespace gles2
573 } // namespace gpu 574 } // namespace gpu
574 575
575 576
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698