| 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 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 519 settings.use_zero_copy = true; | 519 settings.use_zero_copy = true; |
| 520 | 520 |
| 521 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 521 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 522 settings.initial_debug_state.SetRecordRenderingStats( | 522 settings.initial_debug_state.SetRecordRenderingStats( |
| 523 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 523 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
| 524 settings.initial_debug_state.show_fps_counter = | 524 settings.initial_debug_state.show_fps_counter = |
| 525 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 525 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
| 526 settings.single_thread_proxy_scheduler = true; | 526 settings.single_thread_proxy_scheduler = true; |
| 527 | 527 |
| 528 animation_host_ = cc::AnimationHost::CreateMainInstance(); | 528 animation_host_ = cc::AnimationHost::CreateMainInstance(); |
| 529 GetBufferToTextureTargetMap( |
| 530 &settings.resource_settings.buffer_to_texture_target_map); |
| 529 | 531 |
| 530 cc::LayerTreeHost::InitParams params; | 532 cc::LayerTreeHost::InitParams params; |
| 531 params.client = this; | 533 params.client = this; |
| 532 params.task_graph_runner = &g_compositor_dependencies.Get().task_graph_runner; | 534 params.task_graph_runner = &g_compositor_dependencies.Get().task_graph_runner; |
| 533 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); | 535 params.main_task_runner = base::ThreadTaskRunnerHandle::Get(); |
| 534 params.settings = &settings; | 536 params.settings = &settings; |
| 535 params.mutator_host = animation_host_.get(); | 537 params.mutator_host = animation_host_.get(); |
| 536 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, ¶ms); | 538 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, ¶ms); |
| 537 DCHECK(!host_->IsVisible()); | 539 DCHECK(!host_->IsVisible()); |
| 538 host_->SetRootLayer(root_window_->GetLayer()); | 540 host_->SetRootLayer(root_window_->GetLayer()); |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 886 } | 888 } |
| 887 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, | 889 GetSurfaceManager()->UnregisterFrameSinkHierarchy(frame_sink_id_, |
| 888 frame_sink_id); | 890 frame_sink_id); |
| 889 } | 891 } |
| 890 | 892 |
| 891 bool CompositorImpl::HavePendingReadbacks() { | 893 bool CompositorImpl::HavePendingReadbacks() { |
| 892 return !readback_layer_tree_->children().empty(); | 894 return !readback_layer_tree_->children().empty(); |
| 893 } | 895 } |
| 894 | 896 |
| 895 } // namespace content | 897 } // namespace content |
| OLD | NEW |