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

Side by Side Diff: cc/test/layer_tree_test.cc

Issue 2753843003: Create a new action triggered when a BeginMainFrame is not expected before vsync (Closed)
Patch Set: missed one Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/test/layer_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 test_hooks_->DidReceiveCompositorFrameAck(); 347 test_hooks_->DidReceiveCompositorFrameAck();
348 } 348 }
349 349
350 void DidSubmitCompositorFrame() override {} 350 void DidSubmitCompositorFrame() override {}
351 void DidLoseCompositorFrameSink() override {} 351 void DidLoseCompositorFrameSink() override {}
352 void RequestScheduleComposite() override { test_hooks_->ScheduleComposite(); } 352 void RequestScheduleComposite() override { test_hooks_->ScheduleComposite(); }
353 void DidCompletePageScaleAnimation() override {} 353 void DidCompletePageScaleAnimation() override {}
354 void BeginMainFrameNotExpectedSoon() override { 354 void BeginMainFrameNotExpectedSoon() override {
355 test_hooks_->BeginMainFrameNotExpectedSoon(); 355 test_hooks_->BeginMainFrameNotExpectedSoon();
356 } 356 }
357 void DoShortIdleWork(const BeginFrameArgs& args) override {
358 // TODO(delphick): do something here?
Sami 2017/03/24 15:24:11 Unless we're testing something at this level this
Dan Elphick 2017/03/29 16:02:44 Yeah it was just a reminder to check if we needed
359 }
357 360
358 private: 361 private:
359 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) 362 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks)
360 : test_hooks_(test_hooks) {} 363 : test_hooks_(test_hooks) {}
361 364
362 TestHooks* test_hooks_; 365 TestHooks* test_hooks_;
363 }; 366 };
364 367
365 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. 368 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting.
366 class LayerTreeHostForTesting : public LayerTreeHost { 369 class LayerTreeHostForTesting : public LayerTreeHost {
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 DCHECK(task_runner_provider()->IsMainThread() || 889 DCHECK(task_runner_provider()->IsMainThread() ||
887 task_runner_provider()->IsMainThreadBlocked()); 890 task_runner_provider()->IsMainThreadBlocked());
888 return layer_tree_host_.get(); 891 return layer_tree_host_.get();
889 } 892 }
890 893
891 Proxy* LayerTreeTest::proxy() { 894 Proxy* LayerTreeTest::proxy() {
892 return layer_tree_host() ? layer_tree_host()->proxy() : NULL; 895 return layer_tree_host() ? layer_tree_host()->proxy() : NULL;
893 } 896 }
894 897
895 } // namespace cc 898 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698