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 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 settings.renderer_settings.refresh_rate = 60.0; | 437 settings.renderer_settings.refresh_rate = 60.0; |
438 settings.renderer_settings.allow_antialiasing = false; | 438 settings.renderer_settings.allow_antialiasing = false; |
439 settings.renderer_settings.highp_threshold_min = 2048; | 439 settings.renderer_settings.highp_threshold_min = 2048; |
440 settings.use_zero_copy = true; | 440 settings.use_zero_copy = true; |
441 | 441 |
442 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 442 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
443 settings.initial_debug_state.SetRecordRenderingStats( | 443 settings.initial_debug_state.SetRecordRenderingStats( |
444 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 444 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
445 settings.initial_debug_state.show_fps_counter = | 445 settings.initial_debug_state.show_fps_counter = |
446 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 446 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
| 447 settings.use_property_trees = |
| 448 command_line->HasSwitch(cc::switches::kEnableCompositorPropertyTrees); |
447 // TODO(enne): Update this this compositor to use the scheduler. | 449 // TODO(enne): Update this this compositor to use the scheduler. |
448 settings.single_thread_proxy_scheduler = false; | 450 settings.single_thread_proxy_scheduler = false; |
449 | 451 |
450 if (command_line->HasSwitch( | 452 if (command_line->HasSwitch( |
451 switches::kEnableAndroidCompositorAnimationTimelines)) | 453 switches::kEnableAndroidCompositorAnimationTimelines)) |
452 settings.use_compositor_animation_timelines = true; | 454 settings.use_compositor_animation_timelines = true; |
453 | 455 |
454 cc::LayerTreeHost::InitParams params; | 456 cc::LayerTreeHost::InitParams params; |
455 params.client = this; | 457 params.client = this; |
456 params.shared_bitmap_manager = HostSharedBitmapManager::current(); | 458 params.shared_bitmap_manager = HostSharedBitmapManager::current(); |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 | 798 |
797 void CompositorImpl::SetNeedsAnimate() { | 799 void CompositorImpl::SetNeedsAnimate() { |
798 needs_animate_ = true; | 800 needs_animate_ = true; |
799 if (!host_->visible()) | 801 if (!host_->visible()) |
800 return; | 802 return; |
801 | 803 |
802 host_->SetNeedsAnimate(); | 804 host_->SetNeedsAnimate(); |
803 } | 805 } |
804 | 806 |
805 } // namespace content | 807 } // namespace content |
OLD | NEW |