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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
419 DCHECK(!WillComposite()); | 419 DCHECK(!WillComposite()); |
420 needs_composite_ = false; | 420 needs_composite_ = false; |
421 defer_composite_for_gpu_channel_ = false; | 421 defer_composite_for_gpu_channel_ = false; |
422 pending_swapbuffers_ = 0; | 422 pending_swapbuffers_ = 0; |
423 cc::LayerTreeSettings settings; | 423 cc::LayerTreeSettings settings; |
424 settings.renderer_settings.refresh_rate = 60.0; | 424 settings.renderer_settings.refresh_rate = 60.0; |
425 settings.renderer_settings.allow_antialiasing = false; | 425 settings.renderer_settings.allow_antialiasing = false; |
426 settings.renderer_settings.highp_threshold_min = 2048; | 426 settings.renderer_settings.highp_threshold_min = 2048; |
427 settings.impl_side_painting = false; | 427 settings.impl_side_painting = false; |
428 settings.calculate_top_controls_position = false; | 428 settings.calculate_top_controls_position = false; |
429 settings.top_controls_height = 0.f; | |
430 | 429 |
431 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 430 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
432 settings.initial_debug_state.SetRecordRenderingStats( | 431 settings.initial_debug_state.SetRecordRenderingStats( |
433 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 432 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
434 settings.initial_debug_state.show_fps_counter = | 433 settings.initial_debug_state.show_fps_counter = |
435 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 434 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
436 // TODO(enne): Update this this compositor to use the scheduler. | 435 // TODO(enne): Update this this compositor to use the scheduler. |
437 settings.single_thread_proxy_scheduler = false; | 436 settings.single_thread_proxy_scheduler = false; |
438 | 437 |
439 host_ = cc::LayerTreeHost::CreateSingleThreaded( | 438 host_ = cc::LayerTreeHost::CreateSingleThreaded( |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
676 } | 675 } |
677 | 676 |
678 void CompositorImpl::SetNeedsAnimate() { | 677 void CompositorImpl::SetNeedsAnimate() { |
679 if (!host_) | 678 if (!host_) |
680 return; | 679 return; |
681 | 680 |
682 host_->SetNeedsAnimate(); | 681 host_->SetNeedsAnimate(); |
683 } | 682 } |
684 | 683 |
685 } // namespace content | 684 } // namespace content |
OLD | NEW |