summaryrefslogtreecommitdiffstats
path: root/cc/test/test_context_support.h
diff options
context:
space:
mode:
Diffstat (limited to 'cc/test/test_context_support.h')
-rw-r--r--cc/test/test_context_support.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/cc/test/test_context_support.h b/cc/test/test_context_support.h
new file mode 100644
index 0000000..6c2258e
--- /dev/null
+++ b/cc/test/test_context_support.h
@@ -0,0 +1,37 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_TEST_TEST_CONTEXT_SUPPORT_H_
+#define CC_TEST_TEST_CONTEXT_SUPPORT_H_
+
+#include <vector>
+
+#include "gpu/command_buffer/client/context_support.h"
+
+namespace cc {
+
+class TestContextSupport : public gpu::ContextSupport {
+ public:
+ TestContextSupport();
+ virtual ~TestContextSupport();
+
+ // gpu::ContextSupport implementation.
+ virtual void SignalSyncPoint(uint32 sync_point,
+ const base::Closure& callback) OVERRIDE;
+ virtual void SignalQuery(uint32 query,
+ const base::Closure& callback) OVERRIDE;
+ virtual void SendManagedMemoryStats(const gpu::ManagedMemoryStats& stats)
+ OVERRIDE;
+
+ void CallAllSyncPointCallbacks();
+
+ private:
+ std::vector<base::Closure> sync_point_callbacks_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestContextSupport);
+};
+
+} // namespace cc
+
+#endif // CC_TEST_TEST_CONTEXT_SUPPORT_H_