OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/html_viewer/web_layer_tree_view_impl.h" | 5 #include "components/html_viewer/web_layer_tree_view_impl.h" |
6 | 6 |
7 #include "base/thread_task_runner_handle.h" | 7 #include "base/thread_task_runner_handle.h" |
8 #include "cc/blink/web_layer_impl.h" | 8 #include "cc/blink/web_layer_impl.h" |
9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
10 #include "cc/output/begin_frame_args.h" | 10 #include "cc/output/begin_frame_args.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 settings.use_image_texture_targets = std::vector<unsigned>( | 35 settings.use_image_texture_targets = std::vector<unsigned>( |
36 static_cast<size_t>(gfx::BufferFormat::LAST) + 1, GL_TEXTURE_2D); | 36 static_cast<size_t>(gfx::BufferFormat::LAST) + 1, GL_TEXTURE_2D); |
37 // TODO(jam): use multiple compositor raster threads and set gather_pixel_refs | 37 // TODO(jam): use multiple compositor raster threads and set gather_pixel_refs |
38 // accordingly (see content). | 38 // accordingly (see content). |
39 | 39 |
40 // For web contents, layer transforms should scale up the contents of layers | 40 // For web contents, layer transforms should scale up the contents of layers |
41 // to keep content always crisp when possible. | 41 // to keep content always crisp when possible. |
42 settings.layer_transforms_should_scale_layer_contents = true; | 42 settings.layer_transforms_should_scale_layer_contents = true; |
43 | 43 |
44 // Use new animation system (cc::AnimationHost). | |
45 settings.use_compositor_animation_timelines = true; | |
46 | |
47 // TODO(rjkroege): Not having a shared tile transport breaks | 44 // TODO(rjkroege): Not having a shared tile transport breaks |
48 // software compositing. Add bitmap transport support. | 45 // software compositing. Add bitmap transport support. |
49 cc::SharedBitmapManager* shared_bitmap_manager = nullptr; | 46 cc::SharedBitmapManager* shared_bitmap_manager = nullptr; |
50 | 47 |
51 cc::LayerTreeHost::InitParams params; | 48 cc::LayerTreeHost::InitParams params; |
52 params.client = this; | 49 params.client = this; |
53 params.shared_bitmap_manager = shared_bitmap_manager; | 50 params.shared_bitmap_manager = shared_bitmap_manager; |
54 params.gpu_memory_buffer_manager = gpu_memory_buffer_manager; | 51 params.gpu_memory_buffer_manager = gpu_memory_buffer_manager; |
55 params.settings = &settings; | 52 params.settings = &settings; |
56 params.task_graph_runner = task_graph_runner; | 53 params.task_graph_runner = task_graph_runner; |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 use_anchor, | 231 use_anchor, |
235 new_page_scale, | 232 new_page_scale, |
236 duration); | 233 duration); |
237 } | 234 } |
238 | 235 |
239 void WebLayerTreeViewImpl::setNeedsAnimate() { | 236 void WebLayerTreeViewImpl::setNeedsAnimate() { |
240 layer_tree_host_->SetNeedsAnimate(); | 237 layer_tree_host_->SetNeedsAnimate(); |
241 } | 238 } |
242 | 239 |
243 } // namespace html_viewer | 240 } // namespace html_viewer |
OLD | NEW |