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

Unified Diff: cc/test/layer_tree_test.cc

Issue 134623005: Make SingleThreadProxy a SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add scoped_abort_remaining_swap_promises.h Created 6 years, 4 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.cc » ('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 4493671c24d7d836b16f4569893154e257504eae..949c80215d79bf7c7de345b96f1da8f2d0fe7122 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -312,14 +312,6 @@ class LayerTreeHostClientForTesting : public LayerTreeHostClient,
test_hooks_->DidCompleteSwapBuffers();
}
- virtual void ScheduleComposite() OVERRIDE {
- test_hooks_->ScheduleComposite();
- }
-
- virtual void ScheduleAnimation() OVERRIDE {
- test_hooks_->ScheduleAnimation();
- }
-
virtual void DidPostSwapBuffers() OVERRIDE {}
virtual void DidAbortSwapBuffers() OVERRIDE {}
@@ -394,7 +386,6 @@ LayerTreeTest::LayerTreeTest()
end_when_begin_returns_(false),
timed_out_(false),
scheduled_(false),
- schedule_when_set_visible_true_(false),
started_(false),
ended_(false),
delegating_renderer_(false),
@@ -558,15 +549,6 @@ void LayerTreeTest::Timeout() {
EndTest();
}
-void LayerTreeTest::ScheduleComposite() {
- if (!started_ || scheduled_)
- return;
- scheduled_ = true;
- main_task_runner_->PostTask(
- FROM_HERE,
- base::Bind(&LayerTreeTest::DispatchComposite, main_thread_weak_ptr_));
-}
-
void LayerTreeTest::RealEndTest() {
if (layer_tree_host_ && !timed_out_ &&
proxy()->MainFrameWillHappenForTesting()) {
@@ -619,16 +601,8 @@ void LayerTreeTest::DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect) {
void LayerTreeTest::DispatchSetVisible(bool visible) {
DCHECK(!proxy() || proxy()->IsMainThread());
-
- if (!layer_tree_host_)
- return;
-
- layer_tree_host_->SetVisible(visible);
-
- // If the LTH is being made visible and a previous ScheduleComposite() was
- // deferred because the LTH was not visible, re-schedule the composite now.
- if (layer_tree_host_->visible() && schedule_when_set_visible_true_)
- ScheduleComposite();
+ if (layer_tree_host_)
+ layer_tree_host_->SetVisible(visible);
}
void LayerTreeTest::DispatchSetNextCommitForcesRedraw() {
@@ -638,24 +612,6 @@ void LayerTreeTest::DispatchSetNextCommitForcesRedraw() {
layer_tree_host_->SetNextCommitForcesRedraw();
}
-void LayerTreeTest::DispatchComposite() {
- scheduled_ = false;
-
- if (!layer_tree_host_)
- return;
-
- // If the LTH is not visible, defer the composite until the LTH is made
- // visible.
- if (!layer_tree_host_->visible()) {
- schedule_when_set_visible_true_ = true;
- return;
- }
-
- schedule_when_set_visible_true_ = false;
- base::TimeTicks now = gfx::FrameTime::Now();
- layer_tree_host_->Composite(now);
-}
-
void LayerTreeTest::RunTest(bool threaded,
bool delegating_renderer,
bool impl_side_painting) {
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698