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 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
702 } | 702 } |
703 | 703 |
704 bool CompositorImpl::SupportsETC1NonPowerOfTwo() const { | 704 bool CompositorImpl::SupportsETC1NonPowerOfTwo() const { |
705 return gpu_capabilities_.texture_format_etc1_npot; | 705 return gpu_capabilities_.texture_format_etc1_npot; |
706 } | 706 } |
707 | 707 |
708 void CompositorImpl::ScheduleComposite() { | 708 void CompositorImpl::ScheduleComposite() { |
709 if (ignore_schedule_composite_ || !host_->visible()) | 709 if (ignore_schedule_composite_ || !host_->visible()) |
710 return; | 710 return; |
711 | 711 |
712 DCHECK(!needs_composite_ || WillComposite()); | 712 DCHECK_IMPLIES(needs_composite_, WillComposite()); |
713 needs_composite_ = true; | 713 needs_composite_ = true; |
714 // We currently expect layer tree invalidations at most once per frame | 714 // We currently expect layer tree invalidations at most once per frame |
715 // during normal operation and therefore try to composite immediately | 715 // during normal operation and therefore try to composite immediately |
716 // to minimize latency. | 716 // to minimize latency. |
717 PostComposite(COMPOSITE_IMMEDIATELY); | 717 PostComposite(COMPOSITE_IMMEDIATELY); |
718 } | 718 } |
719 | 719 |
720 void CompositorImpl::ScheduleAnimation() { | 720 void CompositorImpl::ScheduleAnimation() { |
721 needs_animate_ = true; | 721 needs_animate_ = true; |
722 | 722 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 | 796 |
797 void CompositorImpl::SetNeedsAnimate() { | 797 void CompositorImpl::SetNeedsAnimate() { |
798 needs_animate_ = true; | 798 needs_animate_ = true; |
799 if (!host_->visible()) | 799 if (!host_->visible()) |
800 return; | 800 return; |
801 | 801 |
802 host_->SetNeedsAnimate(); | 802 host_->SetNeedsAnimate(); |
803 } | 803 } |
804 | 804 |
805 } // namespace content | 805 } // namespace content |
OLD | NEW |