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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 696413003: cc: Introduce forward_begin_frames_to_children and use_external_begin_frame_source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sep
Patch Set: rebase on master Created 6 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/test/scheduler_test_common.cc ('k') | cc/trees/layer_tree_host_unittest.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 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 CreateAndSetTileManager(); 2085 CreateAndSetTileManager();
2086 2086
2087 // Initialize vsync parameters to sane values. 2087 // Initialize vsync parameters to sane values.
2088 const base::TimeDelta display_refresh_interval = 2088 const base::TimeDelta display_refresh_interval =
2089 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond / 2089 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond /
2090 settings_.refresh_rate); 2090 settings_.refresh_rate);
2091 CommitVSyncParameters(base::TimeTicks(), display_refresh_interval); 2091 CommitVSyncParameters(base::TimeTicks(), display_refresh_interval);
2092 2092
2093 // TODO(brianderson): Don't use a hard-coded parent draw time. 2093 // TODO(brianderson): Don't use a hard-coded parent draw time.
2094 base::TimeDelta parent_draw_time = 2094 base::TimeDelta parent_draw_time =
2095 (!settings_.begin_frame_scheduling_enabled && 2095 (!settings_.use_external_begin_frame_source &&
2096 output_surface_->capabilities().adjust_deadline_for_parent) 2096 output_surface_->capabilities().adjust_deadline_for_parent)
2097 ? BeginFrameArgs::DefaultEstimatedParentDrawTime() 2097 ? BeginFrameArgs::DefaultEstimatedParentDrawTime()
2098 : base::TimeDelta(); 2098 : base::TimeDelta();
2099 client_->SetEstimatedParentDrawTime(parent_draw_time); 2099 client_->SetEstimatedParentDrawTime(parent_draw_time);
2100 2100
2101 int max_frames_pending = output_surface_->capabilities().max_frames_pending; 2101 int max_frames_pending = output_surface_->capabilities().max_frames_pending;
2102 if (max_frames_pending <= 0) 2102 if (max_frames_pending <= 0)
2103 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING; 2103 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
2104 client_->SetMaxSwapsPendingOnImplThread(max_frames_pending); 2104 client_->SetMaxSwapsPendingOnImplThread(max_frames_pending);
2105 client_->OnCanDrawStateChanged(CanDraw()); 2105 client_->OnCanDrawStateChanged(CanDraw());
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
3414 } 3414 }
3415 3415
3416 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3416 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3417 std::vector<PictureLayerImpl*>::iterator it = 3417 std::vector<PictureLayerImpl*>::iterator it =
3418 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3418 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3419 DCHECK(it != picture_layers_.end()); 3419 DCHECK(it != picture_layers_.end());
3420 picture_layers_.erase(it); 3420 picture_layers_.erase(it);
3421 } 3421 }
3422 3422
3423 } // namespace cc 3423 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/scheduler_test_common.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698