diff options
author | danakj <danakj@chromium.org> | 2015-11-02 13:54:29 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-02 21:55:57 +0000 |
commit | 913b222888f458024440c73b712c2b6ec3de27be (patch) | |
tree | e7875713fbf35256d772353f7481e814a6d763bd | |
parent | 5dd965e945c24856ad051cff4eb1350b0c29e443 (diff) | |
download | chromium_src-913b222888f458024440c73b712c2b6ec3de27be.zip chromium_src-913b222888f458024440c73b712c2b6ec3de27be.tar.gz chromium_src-913b222888f458024440c73b712c2b6ec3de27be.tar.bz2 |
cc: When doing commit to active, don't abort draws that will checker.
We already waited for NotifyReadyToDraw, there's no point in waiting
longer. This avoids the scheduler trying to do forced draws, which
SingleThreadProxy does not support cuz they don't make sense for it.
R=enne, vmpstr
BUG=549783
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1426533007
Cr-Commit-Position: refs/heads/master@{#357440}
-rw-r--r-- | cc/trees/layer_tree_host_impl.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index f69ae73..0590b35 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -959,7 +959,11 @@ DrawResult LayerTreeHostImpl::CalculateRenderPasses( } } - if (have_missing_animated_tiles) + // If CommitToActiveTree() is true, then we wait to draw until + // NotifyReadyToDraw. That means we're in as good shape as is possible now, + // so there's no reason to stop the draw now (and this is not supported by + // SingleThreadProxy). + if (have_missing_animated_tiles && !CommitToActiveTree()) draw_result = DRAW_ABORTED_CHECKERBOARD_ANIMATIONS; // When we require high res to draw, abort the draw (almost) always. This does @@ -1778,6 +1782,7 @@ void LayerTreeHostImpl::UpdateTreeResourcesForGpuRasterizationIfNeeded() { // We have released tilings for both active and pending tree. // We would not have any content to draw until the pending tree is activated. // Prevent the active tree from drawing until activation. + // TODO(crbug.com/469175): Replace with RequiresHighResToDraw. SetRequiresHighResToDraw(); tree_resources_for_gpu_rasterization_dirty_ = false; @@ -2021,10 +2026,12 @@ void LayerTreeHostImpl::SetVisible(bool visible) { // If we just became visible, we have to ensure that we draw high res tiles, // to prevent checkerboard/low res flashes. - if (visible_) + if (visible_) { + // TODO(crbug.com/469175): Replace with RequiresHighResToDraw. SetRequiresHighResToDraw(); - else + } else { EvictAllUIResources(); + } // Call PrepareTiles to evict tiles when we become invisible. if (!visible) @@ -2300,6 +2307,7 @@ bool LayerTreeHostImpl::InitializeRenderer(OutputSurface* output_surface) { // There will not be anything to draw here, so set high res // to avoid checkerboards, typically when we are recovering // from lost context. + // TODO(crbug.com/469175): Replace with RequiresHighResToDraw. SetRequiresHighResToDraw(); return true; |