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

Unified Diff: gpu/command_buffer/client/fenced_allocator_test.cc

Issue 555020: Redesigned CommandBuffer and NPDevice3D interfaces (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper_test.cc ('k') | gpu/command_buffer/common/command_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/fenced_allocator_test.cc
===================================================================
--- gpu/command_buffer/client/fenced_allocator_test.cc (revision 37414)
+++ gpu/command_buffer/client/fenced_allocator_test.cc (working copy)
@@ -61,6 +61,10 @@
helper_->Initialize();
}
+ int32 GetToken() {
+ return command_buffer_->GetState().token;
+ }
+
virtual void TearDown() {
helper_.release();
}
@@ -187,7 +191,7 @@
// The way we hooked up the helper and engine, it won't process commands
// until it has to wait for something. Which means the token shouldn't have
// passed yet at this point.
- EXPECT_GT(token, command_buffer_->GetToken());
+ EXPECT_GT(token, GetToken());
// This allocation will need to reclaim the space freed above, so that should
// process the commands until the token is passed.
@@ -196,7 +200,7 @@
EXPECT_GE(kBufferSize, offsets[0]+kSize);
EXPECT_TRUE(allocator_->CheckConsistency());
// Check that the token has indeed passed.
- EXPECT_LE(token, command_buffer_->GetToken());
+ EXPECT_LE(token, GetToken());
// Free up everything.
for (unsigned int i = 0; i < kAllocCount; ++i) {
@@ -292,13 +296,13 @@
// The way we hooked up the helper and engine, it won't process commands
// until it has to wait for something. Which means the token shouldn't have
// passed yet at this point.
- EXPECT_GT(token, command_buffer_->GetToken());
+ EXPECT_GT(token, GetToken());
// This allocation will need to reclaim the space freed above, so that should
// process the commands until the token is passed, but it will succeed.
offset = allocator_->Alloc(kBufferSize);
ASSERT_NE(FencedAllocator::kInvalidOffset, offset);
// Check that the token has indeed passed.
- EXPECT_LE(token, command_buffer_->GetToken());
+ EXPECT_LE(token, GetToken());
allocator_->Free(offset);
// Everything now has been freed...
@@ -443,7 +447,7 @@
// The way we hooked up the helper and engine, it won't process commands
// until it has to wait for something. Which means the token shouldn't have
// passed yet at this point.
- EXPECT_GT(token, command_buffer_->GetToken());
+ EXPECT_GT(token, GetToken());
// This allocation will need to reclaim the space freed above, so that should
// process the commands until the token is passed.
@@ -451,7 +455,7 @@
EXPECT_TRUE(pointers[0]);
EXPECT_TRUE(allocator_->CheckConsistency());
// Check that the token has indeed passed.
- EXPECT_LE(token, command_buffer_->GetToken());
+ EXPECT_LE(token, GetToken());
// Free up everything.
for (unsigned int i = 0; i < kAllocCount; ++i) {
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper_test.cc ('k') | gpu/command_buffer/common/command_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698