summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-17 16:06:29 +0000
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-17 16:06:29 +0000
commit4851dd2968902ea74086c1e3bb10a17713c7d7ab (patch)
tree1bc6b6d932b334a48401993ada2a2eef673fc437 /cc
parent78930c94c10bd387717749686097273af9272dfd (diff)
downloadchromium_src-4851dd2968902ea74086c1e3bb10a17713c7d7ab.zip
chromium_src-4851dd2968902ea74086c1e3bb10a17713c7d7ab.tar.gz
chromium_src-4851dd2968902ea74086c1e3bb10a17713c7d7ab.tar.bz2
gpu: Only estimate parent compositor run time when needed
When BeginFrame scheduling is enabled, the browser compositor automatically adjusts the deadline it passes down to the renderer to account for its own draw time. Make sure we don't also subtract the estimated draw time in the renderer. BUG=359566 Review URL: https://codereview.chromium.org/335873002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277774 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/trees/layer_tree_host_impl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 68efe89..35dd368 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -2023,7 +2023,8 @@ bool LayerTreeHostImpl::InitializeRenderer(
// TODO(brianderson): Don't use a hard-coded parent draw time.
base::TimeDelta parent_draw_time =
- output_surface_->capabilities().adjust_deadline_for_parent
+ (!settings_.begin_frame_scheduling_enabled &&
+ output_surface_->capabilities().adjust_deadline_for_parent)
? BeginFrameArgs::DefaultEstimatedParentDrawTime()
: base::TimeDelta();
client_->SetEstimatedParentDrawTime(parent_draw_time);