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

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

Issue 7253052: Execute all GL commands up to the put offset reported by a flush. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/mac/scoped_nsautorelease_pool.h" 9 #include "base/mac/scoped_nsautorelease_pool.h"
10 #include "gpu/command_buffer/client/cmd_buffer_helper.h" 10 #include "gpu/command_buffer/client/cmd_buffer_helper.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 command_buffer_->Initialize(kBufferSize); 44 command_buffer_->Initialize(kBufferSize);
45 Buffer ring_buffer = command_buffer_->GetRingBuffer(); 45 Buffer ring_buffer = command_buffer_->GetRingBuffer();
46 46
47 parser_ = new CommandParser(ring_buffer.ptr, 47 parser_ = new CommandParser(ring_buffer.ptr,
48 ring_buffer.size, 48 ring_buffer.size,
49 0, 49 0,
50 ring_buffer.size, 50 ring_buffer.size,
51 0, 51 0,
52 api_mock_.get()); 52 api_mock_.get());
53 53
54 gpu_scheduler_.reset(new GpuScheduler( 54 gpu_scheduler_.reset(GpuScheduler::CreateForTests(
55 command_buffer_.get(), NULL, parser_, INT_MAX)); 55 command_buffer_.get(), NULL, parser_));
56 command_buffer_->SetPutOffsetChangeCallback(NewCallback( 56 command_buffer_->SetPutOffsetChangeCallback(NewCallback(
57 gpu_scheduler_.get(), &GpuScheduler::PutChanged)); 57 gpu_scheduler_.get(), &GpuScheduler::PutChanged));
58 58
59 api_mock_->set_engine(gpu_scheduler_.get()); 59 api_mock_->set_engine(gpu_scheduler_.get());
60 60
61 helper_.reset(new CommandBufferHelper(command_buffer_.get())); 61 helper_.reset(new CommandBufferHelper(command_buffer_.get()));
62 helper_->Initialize(kBufferSize); 62 helper_->Initialize(kBufferSize);
63 } 63 }
64 64
65 int32 GetToken() { 65 int32 GetToken() {
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 EXPECT_LE(token, GetToken()); 513 EXPECT_LE(token, GetToken());
514 514
515 // Free up everything. 515 // Free up everything.
516 for (unsigned int i = 0; i < kAllocCount; ++i) { 516 for (unsigned int i = 0; i < kAllocCount; ++i) {
517 allocator_->Free(pointers[i]); 517 allocator_->Free(pointers[i]);
518 EXPECT_TRUE(allocator_->CheckConsistency()); 518 EXPECT_TRUE(allocator_->CheckConsistency());
519 } 519 }
520 } 520 }
521 521
522 } // namespace gpu 522 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/cmd_buffer_helper_test.cc ('k') | gpu/command_buffer/client/gles2_c_lib_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698