summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authordyen <dyen@chromium.org>2015-10-22 13:17:23 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-22 20:18:15 +0000
commit6f3b439c2c2ac2baa7234f0da1be8bc7f4805233 (patch)
tree05bea5125a83a2444aa2bdc9a1acc76c9bdd11ab /cc
parent28ea683e75e74977748c4c2fbab8c6c27acd0357 (diff)
downloadchromium_src-6f3b439c2c2ac2baa7234f0da1be8bc7f4805233.zip
chromium_src-6f3b439c2c2ac2baa7234f0da1be8bc7f4805233.tar.gz
chromium_src-6f3b439c2c2ac2baa7234f0da1be8bc7f4805233.tar.bz2
Added support for sync token signals.
Much like the old sync point singals, this CL implements signals for the new light weight sync tokens. BUG=514815 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1413933006 Cr-Commit-Position: refs/heads/master@{#355629}
Diffstat (limited to 'cc')
-rw-r--r--cc/test/test_context_support.cc8
-rw-r--r--cc/test/test_context_support.h2
2 files changed, 10 insertions, 0 deletions
diff --git a/cc/test/test_context_support.cc b/cc/test/test_context_support.cc
index da1021c..55fdee4 100644
--- a/cc/test/test_context_support.cc
+++ b/cc/test/test_context_support.cc
@@ -24,6 +24,14 @@ void TestContextSupport::SignalSyncPoint(uint32 sync_point,
weak_ptr_factory_.GetWeakPtr()));
}
+void TestContextSupport::SignalSyncToken(const gpu::SyncToken& sync_token,
+ const base::Closure& callback) {
+ sync_point_callbacks_.push_back(callback);
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&TestContextSupport::CallAllSyncPointCallbacks,
+ weak_ptr_factory_.GetWeakPtr()));
+}
+
void TestContextSupport::SignalQuery(uint32 query,
const base::Closure& callback) {
sync_point_callbacks_.push_back(callback);
diff --git a/cc/test/test_context_support.h b/cc/test/test_context_support.h
index c686f2a..143a3b3 100644
--- a/cc/test/test_context_support.h
+++ b/cc/test/test_context_support.h
@@ -25,6 +25,8 @@ class TestContextSupport : public gpu::ContextSupport {
// gpu::ContextSupport implementation.
void SignalSyncPoint(uint32 sync_point,
const base::Closure& callback) override;
+ void SignalSyncToken(const gpu::SyncToken& sync_token,
+ const base::Closure& callback) override;
void SignalQuery(uint32 query, const base::Closure& callback) override;
void SetSurfaceVisible(bool visible) override;
void SetAggressivelyFreeResources(bool aggressively_free_resources) override;