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

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

Issue 1025523005: gl_tests: Use zero size gl surface for offscreen rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: make gpu_unittests pass as well Created 5 years, 9 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 #include "gpu/command_buffer/client/mapped_memory.h" 5 #include "gpu/command_buffer/client/mapped_memory.h"
6 6
7 #include <list> 7 #include <list>
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 helper_->Initialize(kBufferSize); 67 helper_->Initialize(kBufferSize);
68 } 68 }
69 69
70 int32 GetToken() { 70 int32 GetToken() {
71 return command_buffer_->GetLastState().token; 71 return command_buffer_->GetLastState().token;
72 } 72 }
73 73
74 #if defined(OS_MACOSX) 74 #if defined(OS_MACOSX)
75 base::mac::ScopedNSAutoreleasePool autorelease_pool_; 75 base::mac::ScopedNSAutoreleasePool autorelease_pool_;
76 #endif 76 #endif
77 #if !defined(USE_OZONE)
77 base::MessageLoop message_loop_; 78 base::MessageLoop message_loop_;
79 #endif
78 scoped_ptr<AsyncAPIMock> api_mock_; 80 scoped_ptr<AsyncAPIMock> api_mock_;
79 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_; 81 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_;
80 scoped_ptr<CommandBufferService> command_buffer_; 82 scoped_ptr<CommandBufferService> command_buffer_;
81 scoped_ptr<GpuScheduler> gpu_scheduler_; 83 scoped_ptr<GpuScheduler> gpu_scheduler_;
82 scoped_ptr<CommandBufferHelper> helper_; 84 scoped_ptr<CommandBufferHelper> helper_;
83 }; 85 };
84 86
85 #ifndef _MSC_VER 87 #ifndef _MSC_VER
86 const unsigned int MappedMemoryTestBase::kBufferSize; 88 const unsigned int MappedMemoryTestBase::kBufferSize;
87 #endif 89 #endif
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 unsigned int offset3; 449 unsigned int offset3;
448 void* mem3 = manager_->Alloc(kSize, &id3, &offset3); 450 void* mem3 = manager_->Alloc(kSize, &id3, &offset3);
449 EXPECT_EQ(manager_->bytes_in_use(), kSize * 2); 451 EXPECT_EQ(manager_->bytes_in_use(), kSize * 2);
450 452
451 manager_->Free(mem2); 453 manager_->Free(mem2);
452 manager_->Free(mem3); 454 manager_->Free(mem3);
453 EXPECT_EQ(manager_->bytes_in_use(), static_cast<size_t>(0)); 455 EXPECT_EQ(manager_->bytes_in_use(), static_cast<size_t>(0));
454 } 456 }
455 457
456 } // namespace gpu 458 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698