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/fenced_allocator_test.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 // This file contains the tests for the FencedAllocator class. 5 // This file contains the tests for the FencedAllocator class.
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/memory/aligned_memory.h" 9 #include "base/memory/aligned_memory.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 helper_->Initialize(kBufferSize); 70 helper_->Initialize(kBufferSize);
71 } 71 }
72 72
73 int32 GetToken() { 73 int32 GetToken() {
74 return command_buffer_->GetLastState().token; 74 return command_buffer_->GetLastState().token;
75 } 75 }
76 76
77 #if defined(OS_MACOSX) 77 #if defined(OS_MACOSX)
78 base::mac::ScopedNSAutoreleasePool autorelease_pool_; 78 base::mac::ScopedNSAutoreleasePool autorelease_pool_;
79 #endif 79 #endif
80 #if !defined(USE_OZONE)
80 base::MessageLoop message_loop_; 81 base::MessageLoop message_loop_;
82 #endif
81 scoped_ptr<AsyncAPIMock> api_mock_; 83 scoped_ptr<AsyncAPIMock> api_mock_;
82 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_; 84 scoped_ptr<TransferBufferManagerInterface> transfer_buffer_manager_;
83 scoped_ptr<CommandBufferService> command_buffer_; 85 scoped_ptr<CommandBufferService> command_buffer_;
84 scoped_ptr<GpuScheduler> gpu_scheduler_; 86 scoped_ptr<GpuScheduler> gpu_scheduler_;
85 scoped_ptr<CommandBufferHelper> helper_; 87 scoped_ptr<CommandBufferHelper> helper_;
86 }; 88 };
87 89
88 #ifndef _MSC_VER 90 #ifndef _MSC_VER
89 const unsigned int BaseFencedAllocatorTest::kBufferSize; 91 const unsigned int BaseFencedAllocatorTest::kBufferSize;
90 #endif 92 #endif
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 EXPECT_LE(token, GetToken()); 638 EXPECT_LE(token, GetToken());
637 639
638 // Free up everything. 640 // Free up everything.
639 for (unsigned int i = 0; i < kAllocCount; ++i) { 641 for (unsigned int i = 0; i < kAllocCount; ++i) {
640 allocator_->Free(pointers[i]); 642 allocator_->Free(pointers[i]);
641 EXPECT_TRUE(allocator_->CheckConsistency()); 643 EXPECT_TRUE(allocator_->CheckConsistency());
642 } 644 }
643 } 645 }
644 646
645 } // namespace gpu 647 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698