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

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

Issue 9387014: Add AsyncFlush when transferbuffer is > a certain size (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 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
« no previous file with comments | « gpu/command_buffer/client/client_test_helper.h ('k') | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/client_test_helper.cc
diff --git a/gpu/command_buffer/client/client_test_helper.cc b/gpu/command_buffer/client/client_test_helper.cc
index e6ddfadde80b75179083f02880ad12f0564b3508..d9942ef4347d4ec07289c0c755868dfa765f354f 100644
--- a/gpu/command_buffer/client/client_test_helper.cc
+++ b/gpu/command_buffer/client/client_test_helper.cc
@@ -30,10 +30,6 @@ CommandBuffer::State MockCommandBufferBase::GetLastState() {
return state_;
}
-void MockCommandBufferBase::Flush(int32 put_offset) {
- state_.put_offset = put_offset;
-}
-
void MockCommandBufferBase::SetGetOffset(int32 get_offset) {
state_.get_offset = get_offset;
}
@@ -98,6 +94,10 @@ int32 MockCommandBufferBase::RegisterTransferBuffer(
return -1;
}
+void MockCommandBufferBase::FlushHelper(int32 put_offset) {
+ state_.put_offset = put_offset;
+}
+
void MockCommandBufferBase::SetToken(int32 token) {
GPU_NOTREACHED();
state_.token = token;
@@ -127,12 +127,30 @@ MockClientCommandBuffer::MockClientCommandBuffer() {
MockClientCommandBuffer::~MockClientCommandBuffer() {
}
+void MockClientCommandBuffer::Flush(int32 put_offset) {
+ FlushHelper(put_offset);
+}
+
void MockClientCommandBuffer::DelegateToFake() {
ON_CALL(*this, DestroyTransferBuffer(_))
.WillByDefault(Invoke(
this, &MockCommandBufferBase::DestroyTransferBufferHelper));
}
+MockClientCommandBufferMockFlush::MockClientCommandBufferMockFlush() {
+ DelegateToFake();
+}
+
+MockClientCommandBufferMockFlush::~MockClientCommandBufferMockFlush() {
+}
+
+void MockClientCommandBufferMockFlush::DelegateToFake() {
+ MockClientCommandBuffer::DelegateToFake();
+ ON_CALL(*this, Flush(_))
+ .WillByDefault(Invoke(
+ this, &MockCommandBufferBase::FlushHelper));
+}
+
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/client/client_test_helper.h ('k') | gpu/command_buffer/client/gles2_implementation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698