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

Side by Side Diff: content/test/web_layer_tree_view_impl_for_testing.cc

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 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
« no previous file with comments | « content/test/test_blink_web_unit_test_support.cc ('k') | media/blink/webmediaplayer_impl.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/test/web_layer_tree_view_impl_for_testing.h" 5 #include "content/test/web_layer_tree_view_impl_for_testing.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 24 matching lines...) Expand all
35 35
36 void WebLayerTreeViewImplForTesting::Initialize() { 36 void WebLayerTreeViewImplForTesting::Initialize() {
37 cc::LayerTreeSettings settings; 37 cc::LayerTreeSettings settings;
38 38
39 // For web contents, layer transforms should scale up the contents of layers 39 // For web contents, layer transforms should scale up the contents of layers
40 // to keep content always crisp when possible. 40 // to keep content always crisp when possible.
41 settings.layer_transforms_should_scale_layer_contents = true; 41 settings.layer_transforms_should_scale_layer_contents = true;
42 42
43 // Accelerated animations are enabled for unit tests. 43 // Accelerated animations are enabled for unit tests.
44 settings.accelerated_animation_enabled = true; 44 settings.accelerated_animation_enabled = true;
45 // External cc::AnimationHost is enabled for unit tests.
46 settings.use_compositor_animation_timelines = true;
47 45
48 cc::LayerTreeHost::InitParams params; 46 cc::LayerTreeHost::InitParams params;
49 params.client = this; 47 params.client = this;
50 params.settings = &settings; 48 params.settings = &settings;
51 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); 49 params.main_task_runner = base::ThreadTaskRunnerHandle::Get();
52 params.task_graph_runner = &task_graph_runner_; 50 params.task_graph_runner = &task_graph_runner_;
53 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params); 51 layer_tree_host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params);
54 DCHECK(layer_tree_host_); 52 DCHECK(layer_tree_host_);
55 } 53 }
56 54
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers( 205 void WebLayerTreeViewImplForTesting::setHaveScrollEventHandlers(
208 bool have_event_handlers) { 206 bool have_event_handlers) {
209 layer_tree_host_->SetHaveScrollEventHandlers(have_event_handlers); 207 layer_tree_host_->SetHaveScrollEventHandlers(have_event_handlers);
210 } 208 }
211 209
212 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const { 210 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const {
213 return layer_tree_host_->have_scroll_event_handlers(); 211 return layer_tree_host_->have_scroll_event_handlers();
214 } 212 }
215 213
216 } // namespace content 214 } // namespace content
OLDNEW
« no previous file with comments | « content/test/test_blink_web_unit_test_support.cc ('k') | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698