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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 settings.top_controls_height = 0.f; | 412 settings.top_controls_height = 0.f; |
413 settings.highp_threshold_min = 2048; | 413 settings.highp_threshold_min = 2048; |
414 | 414 |
415 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 415 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
416 settings.initial_debug_state.SetRecordRenderingStats( | 416 settings.initial_debug_state.SetRecordRenderingStats( |
417 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); | 417 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); |
418 settings.initial_debug_state.show_fps_counter = | 418 settings.initial_debug_state.show_fps_counter = |
419 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); | 419 command_line->HasSwitch(cc::switches::kUIShowFPSCounter); |
420 | 420 |
421 host_ = cc::LayerTreeHost::CreateSingleThreaded( | 421 host_ = cc::LayerTreeHost::CreateSingleThreaded( |
422 this, this, HostSharedBitmapManager::current(), settings); | 422 this, this, HostSharedBitmapManager::current(), settings, |
| 423 make_scoped_refptr(new cc::DefaultMainThreadTaskRunner())); |
423 host_->SetRootLayer(root_layer_); | 424 host_->SetRootLayer(root_layer_); |
424 | 425 |
425 host_->SetVisible(true); | 426 host_->SetVisible(true); |
426 host_->SetLayerTreeHostClientReady(); | 427 host_->SetLayerTreeHostClientReady(); |
427 host_->SetViewportSize(size_); | 428 host_->SetViewportSize(size_); |
428 host_->set_has_transparent_background(has_transparent_background_); | 429 host_->set_has_transparent_background(has_transparent_background_); |
429 host_->SetDeviceScaleFactor(device_scale_factor_); | 430 host_->SetDeviceScaleFactor(device_scale_factor_); |
430 ui_resource_provider_.SetLayerTreeHost(host_.get()); | 431 ui_resource_provider_.SetLayerTreeHost(host_.get()); |
431 } | 432 } |
432 } | 433 } |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 } | 618 } |
618 | 619 |
619 void CompositorImpl::SetNeedsAnimate() { | 620 void CompositorImpl::SetNeedsAnimate() { |
620 if (!host_) | 621 if (!host_) |
621 return; | 622 return; |
622 | 623 |
623 host_->SetNeedsAnimate(); | 624 host_->SetNeedsAnimate(); |
624 } | 625 } |
625 | 626 |
626 } // namespace content | 627 } // namespace content |
OLD | NEW |