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 // This file contains the tests for the FencedAllocator class. | 5 // This file contains the tests for the FencedAllocator class. |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/memory/aligned_memory.h" | 9 #include "base/memory/aligned_memory.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "gpu/command_buffer/client/cmd_buffer_helper.h" | 11 #include "gpu/command_buffer/client/cmd_buffer_helper.h" |
12 #include "gpu/command_buffer/client/fenced_allocator.h" | 12 #include "gpu/command_buffer/client/fenced_allocator.h" |
13 #include "gpu/command_buffer/service/cmd_buffer_engine.h" | 13 #include "gpu/command_buffer/service/cmd_buffer_engine.h" |
14 #include "gpu/command_buffer/service/mocks.h" | |
15 #include "gpu/command_buffer/service/command_buffer_service.h" | 14 #include "gpu/command_buffer/service/command_buffer_service.h" |
16 #include "gpu/command_buffer/service/gpu_scheduler.h" | 15 #include "gpu/command_buffer/service/gpu_scheduler.h" |
| 16 #include "gpu/command_buffer/service/mocks.h" |
17 #include "gpu/command_buffer/service/transfer_buffer_manager.h" | 17 #include "gpu/command_buffer/service/transfer_buffer_manager.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 | 19 |
20 #if defined(OS_MACOSX) | 20 #if defined(OS_MACOSX) |
21 #include "base/mac/scoped_nsautorelease_pool.h" | 21 #include "base/mac/scoped_nsautorelease_pool.h" |
22 #endif | 22 #endif |
23 | 23 |
24 namespace gpu { | 24 namespace gpu { |
25 | 25 |
26 using testing::Return; | 26 using testing::Return; |
(...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 EXPECT_LE(token, GetToken()); | 569 EXPECT_LE(token, GetToken()); |
570 | 570 |
571 // Free up everything. | 571 // Free up everything. |
572 for (unsigned int i = 0; i < kAllocCount; ++i) { | 572 for (unsigned int i = 0; i < kAllocCount; ++i) { |
573 allocator_->Free(pointers[i]); | 573 allocator_->Free(pointers[i]); |
574 EXPECT_TRUE(allocator_->CheckConsistency()); | 574 EXPECT_TRUE(allocator_->CheckConsistency()); |
575 } | 575 } |
576 } | 576 } |
577 | 577 |
578 } // namespace gpu | 578 } // namespace gpu |
OLD | NEW |