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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
641 } | 641 } |
642 | 642 |
643 void CompositorImpl::DidCompleteSwapBuffers() { | 643 void CompositorImpl::DidCompleteSwapBuffers() { |
644 TRACE_EVENT0("compositor", "CompositorImpl::DidCompleteSwapBuffers"); | 644 TRACE_EVENT0("compositor", "CompositorImpl::DidCompleteSwapBuffers"); |
645 DCHECK_GT(pending_swapbuffers_, 0U); | 645 DCHECK_GT(pending_swapbuffers_, 0U); |
646 if (pending_swapbuffers_-- == kMaxSwapBuffers && needs_composite_) | 646 if (pending_swapbuffers_-- == kMaxSwapBuffers && needs_composite_) |
647 PostComposite(COMPOSITE_IMMEDIATELY); | 647 PostComposite(COMPOSITE_IMMEDIATELY); |
648 client_->OnSwapBuffersCompleted(pending_swapbuffers_); | 648 client_->OnSwapBuffersCompleted(pending_swapbuffers_); |
649 } | 649 } |
650 | 650 |
651 void CompositorImpl::DidCompletePageScaleAnimation() {} | |
nasko
2015/01/05 19:38:01
Why add an empty method here instead of inlining i
please use gerrit instead
2015/01/05 20:28:25
Good catch! Inlined.
| |
652 | |
651 void CompositorImpl::DidAbortSwapBuffers() { | 653 void CompositorImpl::DidAbortSwapBuffers() { |
652 TRACE_EVENT0("compositor", "CompositorImpl::DidAbortSwapBuffers"); | 654 TRACE_EVENT0("compositor", "CompositorImpl::DidAbortSwapBuffers"); |
653 // This really gets called only once from | 655 // This really gets called only once from |
654 // SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() when the | 656 // SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() when the |
655 // context was lost. | 657 // context was lost. |
656 ScheduleComposite(); | 658 ScheduleComposite(); |
657 client_->OnSwapBuffersCompleted(0); | 659 client_->OnSwapBuffersCompleted(0); |
658 } | 660 } |
659 | 661 |
660 void CompositorImpl::DidCommit() { | 662 void CompositorImpl::DidCommit() { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
695 | 697 |
696 void CompositorImpl::SetNeedsAnimate() { | 698 void CompositorImpl::SetNeedsAnimate() { |
697 needs_animate_ = true; | 699 needs_animate_ = true; |
698 if (!host_) | 700 if (!host_) |
699 return; | 701 return; |
700 | 702 |
701 host_->SetNeedsAnimate(); | 703 host_->SetNeedsAnimate(); |
702 } | 704 } |
703 | 705 |
704 } // namespace content | 706 } // namespace content |
OLD | NEW |