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