| 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 <utility> | 10 #include <utility> |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 // context was lost. | 609 // context was lost. |
| 610 if (host_->visible()) | 610 if (host_->visible()) |
| 611 host_->SetNeedsCommit(); | 611 host_->SetNeedsCommit(); |
| 612 client_->OnSwapBuffersCompleted(0); | 612 client_->OnSwapBuffersCompleted(0); |
| 613 } | 613 } |
| 614 | 614 |
| 615 void CompositorImpl::DidCommit() { | 615 void CompositorImpl::DidCommit() { |
| 616 root_window_->OnCompositingDidCommit(); | 616 root_window_->OnCompositingDidCommit(); |
| 617 } | 617 } |
| 618 | 618 |
| 619 void CompositorImpl::AttachLayerForReadback(scoped_refptr<cc::Layer> layer) { |
| 620 root_layer_->AddChild(layer); |
| 621 } |
| 622 |
| 619 void CompositorImpl::RequestCopyOfOutputOnRootLayer( | 623 void CompositorImpl::RequestCopyOfOutputOnRootLayer( |
| 620 scoped_ptr<cc::CopyOutputRequest> request) { | 624 scoped_ptr<cc::CopyOutputRequest> request) { |
| 621 root_layer_->RequestCopyOfOutput(std::move(request)); | 625 root_layer_->RequestCopyOfOutput(std::move(request)); |
| 622 } | 626 } |
| 623 | 627 |
| 624 void CompositorImpl::OnVSync(base::TimeTicks frame_time, | 628 void CompositorImpl::OnVSync(base::TimeTicks frame_time, |
| 625 base::TimeDelta vsync_period) { | 629 base::TimeDelta vsync_period) { |
| 626 FOR_EACH_OBSERVER(VSyncObserver, observer_list_, | 630 FOR_EACH_OBSERVER(VSyncObserver, observer_list_, |
| 627 OnVSync(frame_time, vsync_period)); | 631 OnVSync(frame_time, vsync_period)); |
| 628 if (needs_begin_frames_) | 632 if (needs_begin_frames_) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 640 | 644 |
| 641 void CompositorImpl::SetNeedsAnimate() { | 645 void CompositorImpl::SetNeedsAnimate() { |
| 642 needs_animate_ = true; | 646 needs_animate_ = true; |
| 643 if (!host_->visible()) | 647 if (!host_->visible()) |
| 644 return; | 648 return; |
| 645 | 649 |
| 646 host_->SetNeedsAnimate(); | 650 host_->SetNeedsAnimate(); |
| 647 } | 651 } |
| 648 | 652 |
| 649 } // namespace content | 653 } // namespace content |
| OLD | NEW |