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

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

Issue 817603002: cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix rebase compile errors. Created 5 years, 8 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
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void ScheduledActionBeginOutputSurfaceCreation() override { 113 void ScheduledActionBeginOutputSurfaceCreation() override {
114 ThreadProxy::ScheduledActionBeginOutputSurfaceCreation(); 114 ThreadProxy::ScheduledActionBeginOutputSurfaceCreation();
115 test_hooks_->ScheduledActionBeginOutputSurfaceCreation(); 115 test_hooks_->ScheduledActionBeginOutputSurfaceCreation();
116 } 116 }
117 117
118 void ScheduledActionPrepareTiles() override { 118 void ScheduledActionPrepareTiles() override {
119 ThreadProxy::ScheduledActionPrepareTiles(); 119 ThreadProxy::ScheduledActionPrepareTiles();
120 test_hooks_->ScheduledActionPrepareTiles(); 120 test_hooks_->ScheduledActionPrepareTiles();
121 } 121 }
122 122
123 void ScheduledActionInvalidateOutputSurface() override {
124 ThreadProxy::ScheduledActionInvalidateOutputSurface();
125 test_hooks_->ScheduledActionInvalidateOutputSurface();
126 }
127
123 ThreadProxyForTest( 128 ThreadProxyForTest(
124 TestHooks* test_hooks, 129 TestHooks* test_hooks,
125 LayerTreeHost* host, 130 LayerTreeHost* host,
126 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 131 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
127 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, 132 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
128 scoped_ptr<BeginFrameSource> external_begin_frame_source) 133 scoped_ptr<BeginFrameSource> external_begin_frame_source)
129 : ThreadProxy(host, main_task_runner, 134 : ThreadProxy(host, main_task_runner,
130 impl_task_runner, 135 impl_task_runner,
131 external_begin_frame_source.Pass()), 136 external_begin_frame_source.Pass()),
132 test_hooks_(test_hooks) {} 137 test_hooks_(test_hooks) {}
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 LayerTreeHost* LayerTreeTest::layer_tree_host() { 895 LayerTreeHost* LayerTreeTest::layer_tree_host() {
891 // We check for a null proxy here as we sometimes ask for the layer tree host 896 // We check for a null proxy here as we sometimes ask for the layer tree host
892 // when the proxy does not exist, often for checking settings after a test has 897 // when the proxy does not exist, often for checking settings after a test has
893 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See 898 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See
894 // elsewhere in this file for other examples. 899 // elsewhere in this file for other examples.
895 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); 900 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked());
896 return layer_tree_host_.get(); 901 return layer_tree_host_.get();
897 } 902 }
898 903
899 } // namespace cc 904 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698