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

Unified Diff: cc/test/layer_tree_test.cc

Issue 1126253005: cc: Add LayerTreeHost::InitParams for LayerTreeHost creation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moar-fixes Created 5 years, 7 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/fake_layer_tree_host.cc ('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 055d0817d30466ff13be525e2b5edc9dedb5bd5a..8aee21c5b76d3e9c245a725a8f8db32dca96aa18 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -460,10 +460,15 @@ class LayerTreeHostForTesting : public LayerTreeHost {
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
scoped_ptr<BeginFrameSource> external_begin_frame_source) {
+ LayerTreeHost::InitParams params;
+ params.client = client;
+ params.shared_bitmap_manager = shared_bitmap_manager;
+ params.gpu_memory_buffer_manager = gpu_memory_buffer_manager;
+ params.task_graph_runner = task_graph_runner;
+ params.settings = &settings;
+ params.main_task_runner = main_task_runner;
danakj 2015/05/07 18:28:32 this is similar, we used to not pass it to the con
sadrul 2015/05/07 22:47:43 Done (not setting main_task_runner anymore).
scoped_ptr<LayerTreeHostForTesting> layer_tree_host(
- new LayerTreeHostForTesting(test_hooks, client, shared_bitmap_manager,
- gpu_memory_buffer_manager,
- task_graph_runner, settings));
+ new LayerTreeHostForTesting(test_hooks, &params));
if (impl_task_runner.get()) {
layer_tree_host->InitializeForTesting(
ThreadProxyForTest::Create(test_hooks,
@@ -500,17 +505,12 @@ class LayerTreeHostForTesting : public LayerTreeHost {
void set_test_started(bool started) { test_started_ = started; }
private:
- LayerTreeHostForTesting(
- TestHooks* test_hooks,
- LayerTreeHostClient* client,
- SharedBitmapManager* shared_bitmap_manager,
- gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
- TaskGraphRunner* task_graph_runner,
- const LayerTreeSettings& settings)
- : LayerTreeHost(client, NULL, NULL, NULL, settings),
- shared_bitmap_manager_(shared_bitmap_manager),
- gpu_memory_buffer_manager_(gpu_memory_buffer_manager),
- task_graph_runner_(task_graph_runner),
+ LayerTreeHostForTesting(TestHooks* test_hooks,
+ LayerTreeHost::InitParams* params)
+ : LayerTreeHost(params),
+ shared_bitmap_manager_(params->shared_bitmap_manager),
+ gpu_memory_buffer_manager_(params->gpu_memory_buffer_manager),
+ task_graph_runner_(params->task_graph_runner),
sadrul 2015/05/07 04:39:26 Can you double check this a bit? The old code send
danakj 2015/05/07 18:28:32 Right, passing them to the LTH is pointless, cuz t
sadrul 2015/05/07 22:47:43 Thanks for explaining! I have made this change.
test_hooks_(test_hooks),
test_started_(false) {}
« no previous file with comments | « cc/test/fake_layer_tree_host.cc ('k') | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698