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

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

Issue 2400733002: cc: Restructure access to LayerTreeHost in LayerTreeTests. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('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 "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 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
825 TaskRunnerProvider* LayerTreeTest::task_runner_provider() const { 825 TaskRunnerProvider* LayerTreeTest::task_runner_provider() const {
826 LayerTreeHost* host = layer_tree_host_.get(); 826 LayerTreeHost* host = layer_tree_host_.get();
827 827
828 // If this fails, the test has ended and there is no task runners to find 828 // If this fails, the test has ended and there is no task runners to find
829 // anymore. 829 // anymore.
830 DCHECK(host); 830 DCHECK(host);
831 831
832 return host->GetTaskRunnerProvider(); 832 return host->GetTaskRunnerProvider();
833 } 833 }
834 834
835 LayerTreeHostInProcess* LayerTreeTest::layer_tree_host() { 835 LayerTreeHost* LayerTreeTest::layer_tree_host() {
836 DCHECK(task_runner_provider()->IsMainThread() || 836 DCHECK(task_runner_provider()->IsMainThread() ||
837 task_runner_provider()->IsMainThreadBlocked()); 837 task_runner_provider()->IsMainThreadBlocked());
838 return layer_tree_host_.get(); 838 return layer_tree_host_.get();
839 } 839 }
840 840
841 LayerTreeHostInProcess* LayerTreeTest::layer_tree_host_in_process() {
842 DCHECK(task_runner_provider()->IsMainThread() ||
843 task_runner_provider()->IsMainThreadBlocked());
844 DCHECK(!IsRemoteTest());
845 return layer_tree_host_.get();
846 }
841 } // namespace cc 847 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698