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

Unified Diff: cc/test/layer_tree_test.cc

Issue 23694031: Fix race conditions in window snapshot code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Nit Created 7 years, 2 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 | « 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 87fcb546b3a9883c9106b6849f5255ab7b72919d..6a7cf50c8f384c7852111a8a13d4458b8e6eacd9 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -414,6 +414,13 @@ void LayerTreeTest::PostSetVisibleToMainThread(bool visible) {
visible));
}
+void LayerTreeTest::PostSetNextCommitForcesRedrawToMainThread() {
+ proxy()->MainThreadTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(&LayerTreeTest::DispatchSetNextCommitForcesRedraw,
+ main_thread_weak_ptr_));
+}
+
void LayerTreeTest::DoBeginTest() {
client_ = LayerTreeHostClientForTesting::Create(this);
@@ -558,6 +565,13 @@ void LayerTreeTest::DispatchSetVisible(bool visible) {
ScheduleComposite();
}
+void LayerTreeTest::DispatchSetNextCommitForcesRedraw() {
+ DCHECK(!proxy() || proxy()->IsMainThread());
+
+ if (layer_tree_host_)
+ layer_tree_host_->SetNextCommitForcesRedraw();
+}
+
void LayerTreeTest::DispatchComposite() {
scheduled_ = false;
« 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