Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(585)

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.cc

Issue 1417903005: Revert of Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « content/browser/frame_host/render_frame_proxy_host.cc ('k') | content/child/web_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698