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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 params.settings = &settings; | 51 params.settings = &settings; |
52 params.task_graph_runner = task_graph_runner; | 52 params.task_graph_runner = task_graph_runner; |
53 params.main_task_runner = main_thread_compositor_task_runner_; | 53 params.main_task_runner = main_thread_compositor_task_runner_; |
54 | 54 |
55 layer_tree_host_ = | 55 layer_tree_host_ = |
56 cc::LayerTreeHost::CreateThreaded(compositor_task_runner, ¶ms); | 56 cc::LayerTreeHost::CreateThreaded(compositor_task_runner, ¶ms); |
57 DCHECK(layer_tree_host_); | 57 DCHECK(layer_tree_host_); |
58 } | 58 } |
59 | 59 |
60 void WebLayerTreeViewImpl::Initialize(mojo::GpuPtr gpu_service, | 60 void WebLayerTreeViewImpl::Initialize(mojo::GpuPtr gpu_service, |
61 mojo::View* view, | 61 mus::View* view, |
62 blink::WebWidget* widget) { | 62 blink::WebWidget* widget) { |
63 view_ = view; | 63 view_ = view; |
64 widget_ = widget; | 64 widget_ = widget; |
65 if (gpu_service) { | 65 if (gpu_service) { |
66 mojo::CommandBufferPtr cb; | 66 mojo::CommandBufferPtr cb; |
67 gpu_service->CreateOffscreenGLES2Context(GetProxy(&cb)); | 67 gpu_service->CreateOffscreenGLES2Context(GetProxy(&cb)); |
68 scoped_refptr<cc::ContextProvider> context_provider( | 68 scoped_refptr<cc::ContextProvider> context_provider( |
69 new mojo::ContextProviderMojo(cb.PassInterface().PassHandle())); | 69 new mojo::ContextProviderMojo(cb.PassInterface().PassHandle())); |
70 output_surface_.reset( | 70 output_surface_.reset( |
71 new mojo::OutputSurfaceMojo(context_provider, view_->RequestSurface())); | 71 new mojo::OutputSurfaceMojo(context_provider, view_->RequestSurface())); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 use_anchor, | 231 use_anchor, |
232 new_page_scale, | 232 new_page_scale, |
233 duration); | 233 duration); |
234 } | 234 } |
235 | 235 |
236 void WebLayerTreeViewImpl::setNeedsAnimate() { | 236 void WebLayerTreeViewImpl::setNeedsAnimate() { |
237 layer_tree_host_->SetNeedsAnimate(); | 237 layer_tree_host_->SetNeedsAnimate(); |
238 } | 238 } |
239 | 239 |
240 } // namespace html_viewer | 240 } // namespace html_viewer |
OLD | NEW |