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

Side by Side Diff: cc/trees/layer_tree_host_impl.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
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 page_scale, 470 page_scale,
471 duration.InSecondsF()); 471 duration.InSecondsF());
472 } 472 }
473 473
474 SetNeedsAnimate(); 474 SetNeedsAnimate();
475 client_->SetNeedsCommitOnImplThread(); 475 client_->SetNeedsCommitOnImplThread();
476 client_->RenewTreePriority(); 476 client_->RenewTreePriority();
477 } 477 }
478 478
479 void LayerTreeHostImpl::SetNeedsAnimateInput() { 479 void LayerTreeHostImpl::SetNeedsAnimateInput() {
480 DCHECK(!IsCurrentlyScrollingInnerViewport() || 480 DCHECK_IMPLIES(IsCurrentlyScrollingInnerViewport(),
481 !settings_.ignore_root_layer_flings); 481 !settings_.ignore_root_layer_flings);
482 SetNeedsAnimate(); 482 SetNeedsAnimate();
483 } 483 }
484 484
485 bool LayerTreeHostImpl::IsCurrentlyScrollingInnerViewport() const { 485 bool LayerTreeHostImpl::IsCurrentlyScrollingInnerViewport() const {
486 LayerImpl* scrolling_layer = CurrentlyScrollingLayer(); 486 LayerImpl* scrolling_layer = CurrentlyScrollingLayer();
487 if (!scrolling_layer) 487 if (!scrolling_layer)
488 return false; 488 return false;
489 return scrolling_layer == InnerViewportScrollLayer(); 489 return scrolling_layer == InnerViewportScrollLayer();
490 } 490 }
491 491
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 "draw_result", draw_result, "missing tiles", 1012 "draw_result", draw_result, "missing tiles",
1013 num_missing_tiles); 1013 num_missing_tiles);
1014 1014
1015 // Draw has to be successful to not drop the copy request layer. 1015 // Draw has to be successful to not drop the copy request layer.
1016 // When we have a copy request for a layer, we need to draw even if there 1016 // When we have a copy request for a layer, we need to draw even if there
1017 // would be animating checkerboards, because failing under those conditions 1017 // would be animating checkerboards, because failing under those conditions
1018 // triggers a new main frame, which may cause the copy request layer to be 1018 // triggers a new main frame, which may cause the copy request layer to be
1019 // destroyed. 1019 // destroyed.
1020 // TODO(weiliangc): Test copy request w/ output surface recreation. Would 1020 // TODO(weiliangc): Test copy request w/ output surface recreation. Would
1021 // trigger this DCHECK. 1021 // trigger this DCHECK.
1022 DCHECK(!have_copy_request || draw_result == DRAW_SUCCESS); 1022 DCHECK_IMPLIES(have_copy_request, draw_result == DRAW_SUCCESS);
1023 1023
1024 return draw_result; 1024 return draw_result;
1025 } 1025 }
1026 1026
1027 void LayerTreeHostImpl::MainThreadHasStoppedFlinging() { 1027 void LayerTreeHostImpl::MainThreadHasStoppedFlinging() {
1028 top_controls_manager_->MainThreadHasStoppedFlinging(); 1028 top_controls_manager_->MainThreadHasStoppedFlinging();
1029 if (input_handler_client_) 1029 if (input_handler_client_)
1030 input_handler_client_->MainThreadHasStoppedFlinging(); 1030 input_handler_client_->MainThreadHasStoppedFlinging();
1031 } 1031 }
1032 1032
(...skipping 2623 matching lines...) Expand 10 before | Expand all | Expand 10 after
3656 return task_runner_provider_->HasImplThread(); 3656 return task_runner_provider_->HasImplThread();
3657 } 3657 }
3658 3658
3659 bool LayerTreeHostImpl::CommitToActiveTree() const { 3659 bool LayerTreeHostImpl::CommitToActiveTree() const {
3660 // In single threaded mode we skip the pending tree and commit directly to the 3660 // In single threaded mode we skip the pending tree and commit directly to the
3661 // active tree. 3661 // active tree.
3662 return !task_runner_provider_->HasImplThread(); 3662 return !task_runner_provider_->HasImplThread();
3663 } 3663 }
3664 3664
3665 } // namespace cc 3665 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.cc ('k') | cc/trees/property_tree_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698