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 19 matching lines...) Expand all Loading... |
30 weak_factory_(this) { | 30 weak_factory_(this) { |
31 main_thread_bound_weak_ptr_ = weak_factory_.GetWeakPtr(); | 31 main_thread_bound_weak_ptr_ = weak_factory_.GetWeakPtr(); |
32 | 32 |
33 cc::LayerTreeSettings settings; | 33 cc::LayerTreeSettings settings; |
34 | 34 |
35 // Must match the value of | 35 // Must match the value of |
36 // blink::RuntimeEnabledFeature::slimmingPaintEnabled() | 36 // blink::RuntimeEnabledFeature::slimmingPaintEnabled() |
37 settings.use_display_lists = true; | 37 settings.use_display_lists = true; |
38 | 38 |
39 settings.use_image_texture_target = GL_TEXTURE_2D; | 39 settings.use_image_texture_target = GL_TEXTURE_2D; |
40 settings.use_one_copy = true; | |
41 // TODO(jam): use multiple compositor raster threads and set gather_pixel_refs | 40 // TODO(jam): use multiple compositor raster threads and set gather_pixel_refs |
42 // accordingly (see content). | 41 // accordingly (see content). |
43 | 42 |
44 // For web contents, layer transforms should scale up the contents of layers | 43 // For web contents, layer transforms should scale up the contents of layers |
45 // to keep content always crisp when possible. | 44 // to keep content always crisp when possible. |
46 settings.layer_transforms_should_scale_layer_contents = true; | 45 settings.layer_transforms_should_scale_layer_contents = true; |
47 | 46 |
48 cc::SharedBitmapManager* shared_bitmap_manager = nullptr; | 47 cc::SharedBitmapManager* shared_bitmap_manager = nullptr; |
49 | 48 |
50 cc::LayerTreeHost::InitParams params; | 49 cc::LayerTreeHost::InitParams params; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, | 242 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, |
244 main_thread_bound_weak_ptr_, | 243 main_thread_bound_weak_ptr_, |
245 id)); | 244 id)); |
246 } | 245 } |
247 | 246 |
248 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { | 247 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { |
249 view_->SetSurfaceId(mojo::SurfaceId::From(id)); | 248 view_->SetSurfaceId(mojo::SurfaceId::From(id)); |
250 } | 249 } |
251 | 250 |
252 } // namespace html_viewer | 251 } // namespace html_viewer |
OLD | NEW |