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

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

Issue 7458010: Revert 93066 - Execute all GL commands up to the put offset reported by a each flush.This means g... (Closed) Base URL: svn://svn.chromium.org/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 #include "gpu/command_buffer/client/mapped_memory.h" 5 #include "gpu/command_buffer/client/mapped_memory.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/mac/scoped_nsautorelease_pool.h" 8 #include "base/mac/scoped_nsautorelease_pool.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "gpu/command_buffer/client/cmd_buffer_helper.h" 10 #include "gpu/command_buffer/client/cmd_buffer_helper.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 command_buffer_->Initialize(kBufferSize); 42 command_buffer_->Initialize(kBufferSize);
43 Buffer ring_buffer = command_buffer_->GetRingBuffer(); 43 Buffer ring_buffer = command_buffer_->GetRingBuffer();
44 44
45 parser_ = new CommandParser(ring_buffer.ptr, 45 parser_ = new CommandParser(ring_buffer.ptr,
46 ring_buffer.size, 46 ring_buffer.size,
47 0, 47 0,
48 ring_buffer.size, 48 ring_buffer.size,
49 0, 49 0,
50 api_mock_.get()); 50 api_mock_.get());
51 51
52 gpu_scheduler_.reset(GpuScheduler::CreateForTests( 52 gpu_scheduler_.reset(new GpuScheduler(
53 command_buffer_.get(), NULL, parser_)); 53 command_buffer_.get(), NULL, parser_, INT_MAX));
54 command_buffer_->SetPutOffsetChangeCallback(NewCallback( 54 command_buffer_->SetPutOffsetChangeCallback(NewCallback(
55 gpu_scheduler_.get(), &GpuScheduler::PutChanged)); 55 gpu_scheduler_.get(), &GpuScheduler::PutChanged));
56 56
57 api_mock_->set_engine(gpu_scheduler_.get()); 57 api_mock_->set_engine(gpu_scheduler_.get());
58 58
59 helper_.reset(new CommandBufferHelper(command_buffer_.get())); 59 helper_.reset(new CommandBufferHelper(command_buffer_.get()));
60 helper_->Initialize(kBufferSize); 60 helper_->Initialize(kBufferSize);
61 } 61 }
62 62
63 int32 GetToken() { 63 int32 GetToken() {
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 // Check we can alloc. 249 // Check we can alloc.
250 int32 id1 = -1; 250 int32 id1 = -1;
251 unsigned int offset1 = 0xFFFFFFFFU; 251 unsigned int offset1 = 0xFFFFFFFFU;
252 void* mem1 = manager_->Alloc(kSize, &id1, &offset1); 252 void* mem1 = manager_->Alloc(kSize, &id1, &offset1);
253 ASSERT_TRUE(mem1); 253 ASSERT_TRUE(mem1);
254 } 254 }
255 255
256 } // namespace gpu 256 } // namespace gpu
257 257
258 258
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_unittest.cc ('k') | gpu/command_buffer/client/ring_buffer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698