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 "mojo/services/html_viewer/weblayertreeview_impl.h" | 5 #include "mojo/services/html_viewer/weblayertreeview_impl.h" |
6 | 6 |
7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 widget_->layout(); | 72 widget_->layout(); |
73 } | 73 } |
74 | 74 |
75 void WebLayerTreeViewImpl::ApplyViewportDeltas( | 75 void WebLayerTreeViewImpl::ApplyViewportDeltas( |
76 const gfx::Vector2d& scroll_delta, | 76 const gfx::Vector2d& scroll_delta, |
77 float page_scale, | 77 float page_scale, |
78 float top_controls_delta) { | 78 float top_controls_delta) { |
79 widget_->applyViewportDeltas(scroll_delta, page_scale, top_controls_delta); | 79 widget_->applyViewportDeltas(scroll_delta, page_scale, top_controls_delta); |
80 } | 80 } |
81 | 81 |
82 void WebLayerTreeViewImpl::RequestNewOutputSurface(bool fallback) { | 82 scoped_ptr<cc::OutputSurface> WebLayerTreeViewImpl::CreateOutputSurface( |
83 layer_tree_host_->SetOutputSurface(output_surface_.Pass()); | 83 bool fallback) { |
| 84 return output_surface_.Pass(); |
84 } | 85 } |
85 | 86 |
86 void WebLayerTreeViewImpl::DidInitializeOutputSurface() { | 87 void WebLayerTreeViewImpl::DidInitializeOutputSurface() { |
87 } | 88 } |
88 | 89 |
89 void WebLayerTreeViewImpl::WillCommit() { | 90 void WebLayerTreeViewImpl::WillCommit() { |
90 } | 91 } |
91 | 92 |
92 void WebLayerTreeViewImpl::DidCommit() { | 93 void WebLayerTreeViewImpl::DidCommit() { |
93 widget_->didCommitFrameToCompositor(); | 94 widget_->didCommitFrameToCompositor(); |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, | 223 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, |
223 main_thread_bound_weak_ptr_, | 224 main_thread_bound_weak_ptr_, |
224 id)); | 225 id)); |
225 } | 226 } |
226 | 227 |
227 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { | 228 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { |
228 view_->SetSurfaceId(SurfaceId::From(id)); | 229 view_->SetSurfaceId(SurfaceId::From(id)); |
229 } | 230 } |
230 | 231 |
231 } // namespace mojo | 232 } // namespace mojo |
OLD | NEW |