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

Side by Side Diff: gpu/command_buffer/client/transfer_buffer_unittest.cc

Issue 896723008: Add OrderingBarrierCHROMIUM API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits. Created 5 years, 10 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 // Tests for the Command Buffer Helper. 5 // Tests for the Command Buffer Helper.
6 6
7 #include "gpu/command_buffer/client/transfer_buffer.h" 7 #include "gpu/command_buffer/client/transfer_buffer.h"
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "gpu/command_buffer/client/client_test_helper.h" 10 #include "gpu/command_buffer/client/client_test_helper.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 if (transfer_buffer_->HaveBuffer()) { 75 if (transfer_buffer_->HaveBuffer()) {
76 EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) 76 EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_))
77 .Times(1) 77 .Times(1)
78 .RetiresOnSaturation(); 78 .RetiresOnSaturation();
79 } 79 }
80 // For command buffer. 80 // For command buffer.
81 EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) 81 EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_))
82 .Times(1) 82 .Times(1)
83 .RetiresOnSaturation(); 83 .RetiresOnSaturation();
84 EXPECT_CALL(*command_buffer(), OnFlush()).Times(AtMost(1)); 84 EXPECT_CALL(*command_buffer(), OnFlush()).Times(AtMost(1));
85 EXPECT_CALL(*command_buffer(), Flush(_)).Times(AtMost(1));
85 transfer_buffer_.reset(); 86 transfer_buffer_.reset();
86 } 87 }
87 88
88 // GCC requires these declarations, but MSVC requires they not be present 89 // GCC requires these declarations, but MSVC requires they not be present
89 #ifndef _MSC_VER 90 #ifndef _MSC_VER
90 const int32 TransferBufferTest::kNumCommandEntries; 91 const int32 TransferBufferTest::kNumCommandEntries;
91 const int32 TransferBufferTest::kCommandBufferSizeBytes; 92 const int32 TransferBufferTest::kCommandBufferSizeBytes;
92 const unsigned int TransferBufferTest::kStartingOffset; 93 const unsigned int TransferBufferTest::kStartingOffset;
93 const unsigned int TransferBufferTest::kAlignment; 94 const unsigned int TransferBufferTest::kAlignment;
94 const size_t TransferBufferTest::kTransferBufferSize; 95 const size_t TransferBufferTest::kTransferBufferSize;
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 477
477 // Check it's the default size. 478 // Check it's the default size.
478 EXPECT_EQ( 479 EXPECT_EQ(
479 kStartTransferBufferSize - kStartingOffset, 480 kStartTransferBufferSize - kStartingOffset,
480 transfer_buffer_->GetCurrentMaxAllocationWithoutRealloc()); 481 transfer_buffer_->GetCurrentMaxAllocationWithoutRealloc());
481 } 482 }
482 483
483 } // namespace gpu 484 } // namespace gpu
484 485
485 486
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/query_tracker_unittest.cc ('k') | gpu/command_buffer/cmd_buffer_functions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698