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

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

Issue 253943002: Remove CommandBuffer::GetState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: I forgot Poland^Wmojo Created 6 years, 7 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 | Annotate | Revision Log
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 <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // we're on the top side, check we are below the limit. 224 // we're on the top side, check we are below the limit.
225 EXPECT_GE(kTotalNumCommandEntries, limit); 225 EXPECT_GE(kTotalNumCommandEntries, limit);
226 } else { 226 } else {
227 // we're on the bottom side, check we are below get. 227 // we're on the bottom side, check we are below get.
228 EXPECT_GT(parser_get, limit); 228 EXPECT_GT(parser_get, limit);
229 } 229 }
230 } 230 }
231 } 231 }
232 232
233 int32 GetGetOffset() { 233 int32 GetGetOffset() {
234 return command_buffer_->GetState().get_offset; 234 return command_buffer_->GetLastState().get_offset;
235 } 235 }
236 236
237 int32 GetPutOffset() { 237 int32 GetPutOffset() {
238 return command_buffer_->GetState().put_offset; 238 return command_buffer_->GetLastState().put_offset;
239 } 239 }
240 240
241 int32 GetHelperGetOffset() { return helper_->get_offset(); } 241 int32 GetHelperGetOffset() { return helper_->get_offset(); }
242 242
243 int32 GetHelperPutOffset() { return helper_->put_; } 243 int32 GetHelperPutOffset() { return helper_->put_; }
244 244
245 uint32 GetHelperFlushGeneration() { return helper_->flush_generation(); } 245 uint32 GetHelperFlushGeneration() { return helper_->flush_generation(); }
246 246
247 error::Error GetError() { 247 error::Error GetError() {
248 return command_buffer_->GetState().error; 248 return command_buffer_->GetLastState().error;
249 } 249 }
250 250
251 CommandBufferOffset get_helper_put() { return helper_->put_; } 251 CommandBufferOffset get_helper_put() { return helper_->put_; }
252 252
253 #if defined(OS_MACOSX) 253 #if defined(OS_MACOSX)
254 base::mac::ScopedNSAutoreleasePool autorelease_pool_; 254 base::mac::ScopedNSAutoreleasePool autorelease_pool_;
255 #endif 255 #endif
256 base::MessageLoop message_loop_; 256 base::MessageLoop message_loop_;
257 scoped_ptr<AsyncAPIMock> api_mock_; 257 scoped_ptr<AsyncAPIMock> api_mock_;
258 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_; 258 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_;
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 helper_->Finish(); 657 helper_->Finish();
658 658
659 // Check that the commands did happen. 659 // Check that the commands did happen.
660 Mock::VerifyAndClearExpectations(api_mock_.get()); 660 Mock::VerifyAndClearExpectations(api_mock_.get());
661 661
662 // Check the error status. 662 // Check the error status.
663 EXPECT_EQ(error::kNoError, GetError()); 663 EXPECT_EQ(error::kNoError, GetError());
664 } 664 }
665 665
666 } // namespace gpu 666 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/client_test_helper.cc ('k') | gpu/command_buffer/client/fenced_allocator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698