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

Unified Diff: gpu/command_buffer/client/fenced_allocator_test.cc

Issue 116863003: gpu: Reuse transfer buffers more aggresively (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added glWaitAllAsyncTexImage2DCHROMIUM; other review issues addressed Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/client/fenced_allocator_test.cc
diff --git a/gpu/command_buffer/client/fenced_allocator_test.cc b/gpu/command_buffer/client/fenced_allocator_test.cc
index cc99ed36522a238caaa8f4d0de7f29ee2a60cca7..15600a1fae1669647f1f5234d2a339f6e8e49dd3 100644
--- a/gpu/command_buffer/client/fenced_allocator_test.cc
+++ b/gpu/command_buffer/client/fenced_allocator_test.cc
@@ -88,6 +88,11 @@ class BaseFencedAllocatorTest : public testing::Test {
const unsigned int BaseFencedAllocatorTest::kBufferSize;
#endif
+namespace {
+void EmptyPoll() {
+}
+}
+
// Test fixture for FencedAllocator test - Creates a FencedAllocator, using a
// CommandBufferHelper with a mock AsyncAPIInterface for its interface (calling
// it directly, not through the RPC mechanism), making sure Noops are ignored
@@ -96,7 +101,9 @@ class FencedAllocatorTest : public BaseFencedAllocatorTest {
protected:
virtual void SetUp() {
BaseFencedAllocatorTest::SetUp();
- allocator_.reset(new FencedAllocator(kBufferSize, helper_.get()));
+ allocator_.reset(new FencedAllocator(kBufferSize,
+ helper_.get(),
+ base::Bind(&EmptyPoll)));
}
piman 2014/02/20 01:52:37 Could we add a test that exercises the poll featur
virtual void TearDown() {
@@ -406,7 +413,9 @@ class FencedAllocatorWrapperTest : public BaseFencedAllocatorTest {
// something.
buffer_.reset(static_cast<char*>(base::AlignedAlloc(
kBufferSize, kAllocAlignment)));
- allocator_.reset(new FencedAllocatorWrapper(kBufferSize, helper_.get(),
+ allocator_.reset(new FencedAllocatorWrapper(kBufferSize,
+ helper_.get(),
+ base::Bind(&EmptyPoll),
buffer_.get()));
}

Powered by Google App Engine
This is Rietveld 408576698