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 21 matching lines...) Expand all Loading... |
32 base::Bind(&WebLayerTreeViewImpl::OnSurfaceConnectionCreated, | 32 base::Bind(&WebLayerTreeViewImpl::OnSurfaceConnectionCreated, |
33 main_thread_bound_weak_ptr_)); | 33 main_thread_bound_weak_ptr_)); |
34 | 34 |
35 cc::LayerTreeSettings settings; | 35 cc::LayerTreeSettings settings; |
36 | 36 |
37 // For web contents, layer transforms should scale up the contents of layers | 37 // For web contents, layer transforms should scale up the contents of layers |
38 // to keep content always crisp when possible. | 38 // to keep content always crisp when possible. |
39 settings.layer_transforms_should_scale_layer_contents = true; | 39 settings.layer_transforms_should_scale_layer_contents = true; |
40 | 40 |
41 cc::SharedBitmapManager* shared_bitmap_manager = NULL; | 41 cc::SharedBitmapManager* shared_bitmap_manager = NULL; |
| 42 cc::GpuMemoryBufferManager* gpu_memory_buffer_manager = NULL; |
42 | 43 |
43 layer_tree_host_ = | 44 layer_tree_host_ = |
44 cc::LayerTreeHost::CreateThreaded(this, | 45 cc::LayerTreeHost::CreateThreaded(this, |
45 shared_bitmap_manager, | 46 shared_bitmap_manager, |
| 47 gpu_memory_buffer_manager, |
46 settings, | 48 settings, |
47 base::MessageLoopProxy::current(), | 49 base::MessageLoopProxy::current(), |
48 compositor_message_loop_proxy); | 50 compositor_message_loop_proxy); |
49 DCHECK(layer_tree_host_); | 51 DCHECK(layer_tree_host_); |
50 } | 52 } |
51 | 53 |
52 WebLayerTreeViewImpl::~WebLayerTreeViewImpl() { | 54 WebLayerTreeViewImpl::~WebLayerTreeViewImpl() { |
53 } | 55 } |
54 | 56 |
55 void WebLayerTreeViewImpl::WillBeginMainFrame(int frame_id) { | 57 void WebLayerTreeViewImpl::WillBeginMainFrame(int frame_id) { |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, | 236 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, |
235 main_thread_bound_weak_ptr_, | 237 main_thread_bound_weak_ptr_, |
236 id)); | 238 id)); |
237 } | 239 } |
238 | 240 |
239 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { | 241 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { |
240 view_->SetSurfaceId(SurfaceId::From(id)); | 242 view_->SetSurfaceId(SurfaceId::From(id)); |
241 } | 243 } |
242 | 244 |
243 } // namespace mojo | 245 } // namespace mojo |
OLD | NEW |