| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 settings.refresh_rate = 60.0; | 319 settings.refresh_rate = 60.0; |
| 320 settings.impl_side_painting = false; | 320 settings.impl_side_painting = false; |
| 321 settings.allow_antialiasing = false; | 321 settings.allow_antialiasing = false; |
| 322 settings.calculate_top_controls_position = false; | 322 settings.calculate_top_controls_position = false; |
| 323 settings.top_controls_height = 0.f; | 323 settings.top_controls_height = 0.f; |
| 324 settings.highp_threshold_min = 2048; | 324 settings.highp_threshold_min = 2048; |
| 325 | 325 |
| 326 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 326 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 327 settings.initial_debug_state.SetRecordRenderingStats( | 327 settings.initial_debug_state.SetRecordRenderingStats( |
| 328 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 328 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
| 329 settings.initial_debug_state.show_fps_counter = |
| 330 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
| 329 | 331 |
| 330 host_ = cc::LayerTreeHost::CreateSingleThreaded( | 332 host_ = cc::LayerTreeHost::CreateSingleThreaded( |
| 331 this, this, HostSharedBitmapManager::current(), settings); | 333 this, this, HostSharedBitmapManager::current(), settings); |
| 332 host_->SetRootLayer(root_layer_); | 334 host_->SetRootLayer(root_layer_); |
| 333 | 335 |
| 334 host_->SetVisible(true); | 336 host_->SetVisible(true); |
| 335 host_->SetLayerTreeHostClientReady(); | 337 host_->SetLayerTreeHostClientReady(); |
| 336 host_->SetViewportSize(size_); | 338 host_->SetViewportSize(size_); |
| 337 host_->set_has_transparent_background(has_transparent_background_); | 339 host_->set_has_transparent_background(has_transparent_background_); |
| 338 host_->SetDeviceScaleFactor(device_scale_factor_); | 340 host_->SetDeviceScaleFactor(device_scale_factor_); |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 | 516 |
| 515 void CompositorImpl::DidCommit() { | 517 void CompositorImpl::DidCommit() { |
| 516 root_window_->OnCompositingDidCommit(); | 518 root_window_->OnCompositingDidCommit(); |
| 517 } | 519 } |
| 518 | 520 |
| 519 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) { | 521 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) { |
| 520 root_layer_->AddChild(layer); | 522 root_layer_->AddChild(layer); |
| 521 } | 523 } |
| 522 | 524 |
| 523 } // namespace content | 525 } // namespace content |
| OLD | NEW |