| 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 #include <stdint.h> | 9 #include <stdint.h> |
| 10 #include <unordered_set> | 10 #include <unordered_set> |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 } | 531 } |
| 532 | 532 |
| 533 void CompositorImpl::UpdateLayerTreeHost() { | 533 void CompositorImpl::UpdateLayerTreeHost() { |
| 534 client_->UpdateLayerTreeHost(); | 534 client_->UpdateLayerTreeHost(); |
| 535 if (needs_animate_) { | 535 if (needs_animate_) { |
| 536 needs_animate_ = false; | 536 needs_animate_ = false; |
| 537 root_window_->Animate(base::TimeTicks::Now()); | 537 root_window_->Animate(base::TimeTicks::Now()); |
| 538 } | 538 } |
| 539 } | 539 } |
| 540 | 540 |
| 541 void CompositorImpl::OnGpuChannelEstablished() { | 541 void CompositorImpl::OnGpuChannelEstablished( |
| 542 scoped_refptr<gpu::GpuChannelHost> gpu_channel) { |
| 542 establish_gpu_channel_timeout_.Stop(); | 543 establish_gpu_channel_timeout_.Stop(); |
| 543 CreateOutputSurface(); | 544 CreateOutputSurface(); |
| 544 } | 545 } |
| 545 | 546 |
| 546 void CompositorImpl::OnGpuChannelTimeout() { | 547 void CompositorImpl::OnGpuChannelTimeout() { |
| 547 LOG(FATAL) << "Timed out waiting for GPU channel."; | 548 LOG(FATAL) << "Timed out waiting for GPU channel."; |
| 548 } | 549 } |
| 549 | 550 |
| 550 void CompositorImpl::RequestNewOutputSurface() { | 551 void CompositorImpl::RequestNewOutputSurface() { |
| 551 output_surface_request_pending_ = true; | 552 output_surface_request_pending_ = true; |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 void CompositorImpl::SetNeedsAnimate() { | 800 void CompositorImpl::SetNeedsAnimate() { |
| 800 needs_animate_ = true; | 801 needs_animate_ = true; |
| 801 if (!host_->visible()) | 802 if (!host_->visible()) |
| 802 return; | 803 return; |
| 803 | 804 |
| 804 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); | 805 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); |
| 805 host_->SetNeedsAnimate(); | 806 host_->SetNeedsAnimate(); |
| 806 } | 807 } |
| 807 | 808 |
| 808 } // namespace content | 809 } // namespace content |
| OLD | NEW |