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