| 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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 // context was lost. | 771 // context was lost. |
| 772 if (host_->visible()) | 772 if (host_->visible()) |
| 773 host_->SetNeedsCommit(); | 773 host_->SetNeedsCommit(); |
| 774 client_->OnSwapBuffersCompleted(0); | 774 client_->OnSwapBuffersCompleted(0); |
| 775 } | 775 } |
| 776 | 776 |
| 777 void CompositorImpl::DidCommit() { | 777 void CompositorImpl::DidCommit() { |
| 778 root_window_->OnCompositingDidCommit(); | 778 root_window_->OnCompositingDidCommit(); |
| 779 } | 779 } |
| 780 | 780 |
| 781 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) { |
| 782 root_layer_->AddChild(layer); |
| 783 } |
| 784 |
| 781 void CompositorImpl::RequestCopyOfOutputOnRootLayer( | 785 void CompositorImpl::RequestCopyOfOutputOnRootLayer( |
| 782 std::unique_ptr<cc::CopyOutputRequest> request) { | 786 std::unique_ptr<cc::CopyOutputRequest> request) { |
| 783 root_layer_->RequestCopyOfOutput(std::move(request)); | 787 root_layer_->RequestCopyOfOutput(std::move(request)); |
| 784 } | 788 } |
| 785 | 789 |
| 786 void CompositorImpl::OnVSync(base::TimeTicks frame_time, | 790 void CompositorImpl::OnVSync(base::TimeTicks frame_time, |
| 787 base::TimeDelta vsync_period) { | 791 base::TimeDelta vsync_period) { |
| 788 FOR_EACH_OBSERVER(VSyncObserver, observer_list_, | 792 FOR_EACH_OBSERVER(VSyncObserver, observer_list_, |
| 789 OnVSync(frame_time, vsync_period)); | 793 OnVSync(frame_time, vsync_period)); |
| 790 if (needs_begin_frames_) | 794 if (needs_begin_frames_) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 803 void CompositorImpl::SetNeedsAnimate() { | 807 void CompositorImpl::SetNeedsAnimate() { |
| 804 needs_animate_ = true; | 808 needs_animate_ = true; |
| 805 if (!host_->visible()) | 809 if (!host_->visible()) |
| 806 return; | 810 return; |
| 807 | 811 |
| 808 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); | 812 TRACE_EVENT0("compositor", "Compositor::SetNeedsAnimate"); |
| 809 host_->SetNeedsAnimate(); | 813 host_->SetNeedsAnimate(); |
| 810 } | 814 } |
| 811 | 815 |
| 812 } // namespace content | 816 } // namespace content |
| OLD | NEW |