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