OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |