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