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

Unified Diff: cc/test/layer_tree_test.cc

Issue 60513007: Add SwapPromise support to LayerTreeHost and LayerTreeImpl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: add OVERRIDE to TestSwapPromise::DidNotSwap Created 7 years, 1 month 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 | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_test.cc
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index d70d7971db0819bff77f795a91934688dc4244a2..de0b9076c77374e2018a7859872b5dc798170d2f 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -409,6 +409,13 @@ void LayerTreeTest::PostSetNeedsCommitToMainThread() {
main_thread_weak_ptr_));
}
+void LayerTreeTest::PostSetNeedsUpdateLayersToMainThread() {
+ main_task_runner_->PostTask(
+ FROM_HERE,
+ base::Bind(&LayerTreeTest::DispatchSetNeedsUpdateLayers,
+ main_thread_weak_ptr_));
+}
+
void LayerTreeTest::PostReadbackToMainThread() {
main_task_runner_->PostTask(
FROM_HERE,
@@ -538,6 +545,13 @@ void LayerTreeTest::DispatchSetNeedsCommit() {
layer_tree_host_->SetNeedsCommit();
}
+void LayerTreeTest::DispatchSetNeedsUpdateLayers() {
+ DCHECK(!proxy() || proxy()->IsMainThread());
+
+ if (layer_tree_host_)
+ layer_tree_host_->SetNeedsUpdateLayers();
+}
+
void LayerTreeTest::DispatchReadback() {
DCHECK(!proxy() || proxy()->IsMainThread());
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698