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 21 matching lines...) Expand all Loading... |
32 main_thread_bound_weak_ptr_ = weak_factory_.GetWeakPtr(); | 32 main_thread_bound_weak_ptr_ = weak_factory_.GetWeakPtr(); |
33 | 33 |
34 cc::LayerTreeSettings settings; | 34 cc::LayerTreeSettings settings; |
35 | 35 |
36 // Must match the value of | 36 // Must match the value of |
37 // blink::RuntimeEnabledFeature::slimmingPaintEnabled() | 37 // blink::RuntimeEnabledFeature::slimmingPaintEnabled() |
38 settings.use_display_lists = true; | 38 settings.use_display_lists = true; |
39 | 39 |
40 settings.use_image_texture_targets = std::vector<unsigned>( | 40 settings.use_image_texture_targets = std::vector<unsigned>( |
41 static_cast<size_t>(gfx::BufferFormat::LAST) + 1, GL_TEXTURE_2D); | 41 static_cast<size_t>(gfx::BufferFormat::LAST) + 1, GL_TEXTURE_2D); |
42 settings.use_one_copy = true; | |
43 // TODO(jam): use multiple compositor raster threads and set gather_pixel_refs | 42 // TODO(jam): use multiple compositor raster threads and set gather_pixel_refs |
44 // accordingly (see content). | 43 // accordingly (see content). |
45 | 44 |
46 // For web contents, layer transforms should scale up the contents of layers | 45 // For web contents, layer transforms should scale up the contents of layers |
47 // to keep content always crisp when possible. | 46 // to keep content always crisp when possible. |
48 settings.layer_transforms_should_scale_layer_contents = true; | 47 settings.layer_transforms_should_scale_layer_contents = true; |
49 | 48 |
50 // TODO(rjkroege): Not having a shared tile transport breaks | 49 // TODO(rjkroege): Not having a shared tile transport breaks |
51 // software compositing. Add bitmap transport support. | 50 // software compositing. Add bitmap transport support. |
52 cc::SharedBitmapManager* shared_bitmap_manager = nullptr; | 51 cc::SharedBitmapManager* shared_bitmap_manager = nullptr; |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, | 252 base::Bind(&WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread, |
254 main_thread_bound_weak_ptr_, | 253 main_thread_bound_weak_ptr_, |
255 id)); | 254 id)); |
256 } | 255 } |
257 | 256 |
258 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { | 257 void WebLayerTreeViewImpl::DidCreateSurfaceOnMainThread(cc::SurfaceId id) { |
259 view_->SetSurfaceId(mojo::SurfaceId::From(id)); | 258 view_->SetSurfaceId(mojo::SurfaceId::From(id)); |
260 } | 259 } |
261 | 260 |
262 } // namespace html_viewer | 261 } // namespace html_viewer |
OLD | NEW |