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 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 } | 637 } |
638 | 638 |
639 void CompositorImpl::DidCompleteSwapBuffers() { | 639 void CompositorImpl::DidCompleteSwapBuffers() { |
640 TRACE_EVENT0("compositor", "CompositorImpl::DidCompleteSwapBuffers"); | 640 TRACE_EVENT0("compositor", "CompositorImpl::DidCompleteSwapBuffers"); |
641 DCHECK_GT(pending_swapbuffers_, 0U); | 641 DCHECK_GT(pending_swapbuffers_, 0U); |
642 if (pending_swapbuffers_-- == kMaxSwapBuffers && needs_composite_) | 642 if (pending_swapbuffers_-- == kMaxSwapBuffers && needs_composite_) |
643 PostComposite(COMPOSITE_IMMEDIATELY); | 643 PostComposite(COMPOSITE_IMMEDIATELY); |
644 client_->OnSwapBuffersCompleted(pending_swapbuffers_); | 644 client_->OnSwapBuffersCompleted(pending_swapbuffers_); |
645 } | 645 } |
646 | 646 |
| 647 void CompositorImpl::DidCompletePageScaleAnimation() {} |
| 648 |
647 void CompositorImpl::DidAbortSwapBuffers() { | 649 void CompositorImpl::DidAbortSwapBuffers() { |
648 TRACE_EVENT0("compositor", "CompositorImpl::DidAbortSwapBuffers"); | 650 TRACE_EVENT0("compositor", "CompositorImpl::DidAbortSwapBuffers"); |
649 // This really gets called only once from | 651 // This really gets called only once from |
650 // SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() when the | 652 // SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() when the |
651 // context was lost. | 653 // context was lost. |
652 ScheduleComposite(); | 654 ScheduleComposite(); |
653 client_->OnSwapBuffersCompleted(0); | 655 client_->OnSwapBuffersCompleted(0); |
654 } | 656 } |
655 | 657 |
656 void CompositorImpl::DidCommit() { | 658 void CompositorImpl::DidCommit() { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 | 693 |
692 void CompositorImpl::SetNeedsAnimate() { | 694 void CompositorImpl::SetNeedsAnimate() { |
693 needs_animate_ = true; | 695 needs_animate_ = true; |
694 if (!host_) | 696 if (!host_) |
695 return; | 697 return; |
696 | 698 |
697 host_->SetNeedsAnimate(); | 699 host_->SetNeedsAnimate(); |
698 } | 700 } |
699 | 701 |
700 } // namespace content | 702 } // namespace content |
OLD | NEW |