| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 // TODO(enne): Update this this compositor to use the scheduler. | 406 // TODO(enne): Update this this compositor to use the scheduler. |
| 407 settings.single_thread_proxy_scheduler = false; | 407 settings.single_thread_proxy_scheduler = false; |
| 408 | 408 |
| 409 host_ = cc::LayerTreeHost::CreateSingleThreaded( | 409 host_ = cc::LayerTreeHost::CreateSingleThreaded( |
| 410 this, | 410 this, |
| 411 this, | 411 this, |
| 412 HostSharedBitmapManager::current(), | 412 HostSharedBitmapManager::current(), |
| 413 BrowserGpuMemoryBufferManager::current(), | 413 BrowserGpuMemoryBufferManager::current(), |
| 414 settings, | 414 settings, |
| 415 base::MessageLoopProxy::current(), | 415 base::MessageLoopProxy::current(), |
| 416 nullptr, |
| 416 nullptr); | 417 nullptr); |
| 417 host_->SetRootLayer(root_layer_); | 418 host_->SetRootLayer(root_layer_); |
| 418 | 419 |
| 419 host_->SetVisible(true); | 420 host_->SetVisible(true); |
| 420 host_->SetLayerTreeHostClientReady(); | 421 host_->SetLayerTreeHostClientReady(); |
| 421 host_->SetViewportSize(size_); | 422 host_->SetViewportSize(size_); |
| 422 host_->set_has_transparent_background(has_transparent_background_); | 423 host_->set_has_transparent_background(has_transparent_background_); |
| 423 host_->SetDeviceScaleFactor(device_scale_factor_); | 424 host_->SetDeviceScaleFactor(device_scale_factor_); |
| 424 | 425 |
| 425 if (needs_animate_) | 426 if (needs_animate_) |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 | 699 |
| 699 void CompositorImpl::SetNeedsAnimate() { | 700 void CompositorImpl::SetNeedsAnimate() { |
| 700 needs_animate_ = true; | 701 needs_animate_ = true; |
| 701 if (!host_) | 702 if (!host_) |
| 702 return; | 703 return; |
| 703 | 704 |
| 704 host_->SetNeedsAnimate(); | 705 host_->SetNeedsAnimate(); |
| 705 } | 706 } |
| 706 | 707 |
| 707 } // namespace content | 708 } // namespace content |
| OLD | NEW |