| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 void CompositorImpl::CreateLayerTreeHost() { | 372 void CompositorImpl::CreateLayerTreeHost() { |
| 373 DCHECK(!host_); | 373 DCHECK(!host_); |
| 374 DCHECK(!WillCompositeThisFrame()); | 374 DCHECK(!WillCompositeThisFrame()); |
| 375 needs_composite_ = false; | 375 needs_composite_ = false; |
| 376 pending_swapbuffers_ = 0; | 376 pending_swapbuffers_ = 0; |
| 377 cc::LayerTreeSettings settings; | 377 cc::LayerTreeSettings settings; |
| 378 settings.renderer_settings.refresh_rate = 60.0; | 378 settings.renderer_settings.refresh_rate = 60.0; |
| 379 settings.renderer_settings.allow_antialiasing = false; | 379 settings.renderer_settings.allow_antialiasing = false; |
| 380 settings.renderer_settings.highp_threshold_min = 2048; | 380 settings.renderer_settings.highp_threshold_min = 2048; |
| 381 settings.impl_side_painting = true; | 381 settings.impl_side_painting = true; |
| 382 settings.calculate_top_controls_position = false; |
| 382 | 383 |
| 383 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 384 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 384 settings.initial_debug_state.SetRecordRenderingStats( | 385 settings.initial_debug_state.SetRecordRenderingStats( |
| 385 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 386 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
| 386 settings.initial_debug_state.show_fps_counter = | 387 settings.initial_debug_state.show_fps_counter = |
| 387 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 388 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
| 388 // TODO(enne): Update this this compositor to use the scheduler. | 389 // TODO(enne): Update this this compositor to use the scheduler. |
| 389 settings.single_thread_proxy_scheduler = false; | 390 settings.single_thread_proxy_scheduler = false; |
| 390 | 391 |
| 391 host_ = cc::LayerTreeHost::CreateSingleThreaded( | 392 host_ = cc::LayerTreeHost::CreateSingleThreaded( |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 | 693 |
| 693 void CompositorImpl::SetNeedsAnimate() { | 694 void CompositorImpl::SetNeedsAnimate() { |
| 694 needs_animate_ = true; | 695 needs_animate_ = true; |
| 695 if (!host_) | 696 if (!host_) |
| 696 return; | 697 return; |
| 697 | 698 |
| 698 host_->SetNeedsAnimate(); | 699 host_->SetNeedsAnimate(); |
| 699 } | 700 } |
| 700 | 701 |
| 701 } // namespace content | 702 } // namespace content |
| OLD | NEW |