| 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 |
| 44 // TODO(rjkroege): Not having a shared tile transport breaks | 47 // TODO(rjkroege): Not having a shared tile transport breaks |
| 45 // software compositing. Add bitmap transport support. | 48 // software compositing. Add bitmap transport support. |
| 46 cc::SharedBitmapManager* shared_bitmap_manager = nullptr; | 49 cc::SharedBitmapManager* shared_bitmap_manager = nullptr; |
| 47 | 50 |
| 48 cc::LayerTreeHost::InitParams params; | 51 cc::LayerTreeHost::InitParams params; |
| 49 params.client = this; | 52 params.client = this; |
| 50 params.shared_bitmap_manager = shared_bitmap_manager; | 53 params.shared_bitmap_manager = shared_bitmap_manager; |
| 51 params.gpu_memory_buffer_manager = gpu_memory_buffer_manager; | 54 params.gpu_memory_buffer_manager = gpu_memory_buffer_manager; |
| 52 params.settings = &settings; | 55 params.settings = &settings; |
| 53 params.task_graph_runner = task_graph_runner; | 56 params.task_graph_runner = task_graph_runner; |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 use_anchor, | 234 use_anchor, |
| 232 new_page_scale, | 235 new_page_scale, |
| 233 duration); | 236 duration); |
| 234 } | 237 } |
| 235 | 238 |
| 236 void WebLayerTreeViewImpl::setNeedsAnimate() { | 239 void WebLayerTreeViewImpl::setNeedsAnimate() { |
| 237 layer_tree_host_->SetNeedsAnimate(); | 240 layer_tree_host_->SetNeedsAnimate(); |
| 238 } | 241 } |
| 239 | 242 |
| 240 } // namespace html_viewer | 243 } // namespace html_viewer |
| OLD | NEW |