OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/compositor_impl_android.h" | 5 #include "content/browser/renderer_host/compositor_impl_android.h" |
6 | 6 |
7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
8 #include <android/native_window_jni.h> | 8 #include <android/native_window_jni.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 #include <unordered_set> | 10 #include <unordered_set> |
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
531 settings.use_zero_copy = true; | 531 settings.use_zero_copy = true; |
532 | 532 |
533 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 533 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
534 settings.initial_debug_state.SetRecordRenderingStats( | 534 settings.initial_debug_state.SetRecordRenderingStats( |
535 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 535 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
536 settings.initial_debug_state.show_fps_counter = | 536 settings.initial_debug_state.show_fps_counter = |
537 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 537 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
538 settings.single_thread_proxy_scheduler = true; | 538 settings.single_thread_proxy_scheduler = true; |
539 | 539 |
540 animation_host_ = cc::AnimationHost::CreateMainInstance(); | 540 animation_host_ = cc::AnimationHost::CreateMainInstance(); |
541 settings.resource_settings.buffer_to_texture_target_map = | |
danakj
2017/06/30 16:03:23
group this with the other settings, on L359?
sujith
2017/07/01 12:30:13
Hope its L539. Done
| |
542 GetBufferToTextureTargetMap(); | |
541 | 543 |
542 cc::LayerTreeHost::InitParams params; | 544 cc::LayerTreeHost::InitParams params; |
543 params.client = this; | 545 params.client = this; |
544 params.task_graph_runner = &g_compositor_dependencies.Get().task_graph_runner; | 546 params.task_graph_runner = &g_compositor_dependencies.Get().task_graph_runner; |
545 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); | 547 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); |
546 params.settings = &settings; | 548 params.settings = &settings; |
547 params.mutator_host = animation_host_.get(); | 549 params.mutator_host = animation_host_.get(); |
548 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, ¶ms); | 550 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, ¶ms); |
549 DCHECK(!host_->IsVisible()); | 551 DCHECK(!host_->IsVisible()); |
550 host_->SetRootLayer(root_window_->GetLayer()); | 552 host_->SetRootLayer(root_window_->GetLayer()); |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
898 } | 900 } |
899 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, | 901 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, |
900 frame_sink_id); | 902 frame_sink_id); |
901 } | 903 } |
902 | 904 |
903 bool CompositorImpl::HavePendingReadbacks() { | 905 bool CompositorImpl::HavePendingReadbacks() { |
904 return !readback_layer_tree_->children().empty(); | 906 return !readback_layer_tree_->children().empty(); |
905 } | 907 } |
906 | 908 |
907 } // namespace content | 909 } // namespace content |
OLD | NEW |