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