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

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: 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
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 2159 matching lines...) Expand 10 before | Expand all | Expand 10 after
2170 CreateAndSetTileManager(); 2170 CreateAndSetTileManager();
2171 2171
2172 // Initialize vsync parameters to sane values. 2172 // Initialize vsync parameters to sane values.
2173 const base::TimeDelta display_refresh_interval = 2173 const base::TimeDelta display_refresh_interval =
2174 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond / 2174 base::TimeDelta::FromMicroseconds(base::Time::kMicrosecondsPerSecond /
2175 settings_.refresh_rate); 2175 settings_.refresh_rate);
2176 CommitVSyncParameters(base::TimeTicks(), display_refresh_interval); 2176 CommitVSyncParameters(base::TimeTicks(), display_refresh_interval);
2177 2177
2178 // TODO(brianderson): Don't use a hard-coded parent draw time. 2178 // TODO(brianderson): Don't use a hard-coded parent draw time.
2179 base::TimeDelta parent_draw_time = 2179 base::TimeDelta parent_draw_time =
2180 (!settings_.begin_frame_scheduling_enabled && 2180 (!settings_.begin_frame_receiver &&
2181 output_surface_->capabilities().adjust_deadline_for_parent) 2181 output_surface_->capabilities().adjust_deadline_for_parent)
2182 ? BeginFrameArgs::DefaultEstimatedParentDrawTime() 2182 ? BeginFrameArgs::DefaultEstimatedParentDrawTime()
2183 : base::TimeDelta(); 2183 : base::TimeDelta();
2184 client_->SetEstimatedParentDrawTime(parent_draw_time); 2184 client_->SetEstimatedParentDrawTime(parent_draw_time);
2185 2185
2186 int max_frames_pending = output_surface_->capabilities().max_frames_pending; 2186 int max_frames_pending = output_surface_->capabilities().max_frames_pending;
2187 if (max_frames_pending <= 0) 2187 if (max_frames_pending <= 0)
2188 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING; 2188 max_frames_pending = OutputSurface::DEFAULT_MAX_FRAMES_PENDING;
2189 client_->SetMaxSwapsPendingOnImplThread(max_frames_pending); 2189 client_->SetMaxSwapsPendingOnImplThread(max_frames_pending);
2190 client_->OnCanDrawStateChanged(CanDraw()); 2190 client_->OnCanDrawStateChanged(CanDraw());
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after
3504 } 3504 }
3505 3505
3506 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) { 3506 void LayerTreeHostImpl::UnregisterPictureLayerImpl(PictureLayerImpl* layer) {
3507 std::vector<PictureLayerImpl*>::iterator it = 3507 std::vector<PictureLayerImpl*>::iterator it =
3508 std::find(picture_layers_.begin(), picture_layers_.end(), layer); 3508 std::find(picture_layers_.begin(), picture_layers_.end(), layer);
3509 DCHECK(it != picture_layers_.end()); 3509 DCHECK(it != picture_layers_.end());
3510 picture_layers_.erase(it); 3510 picture_layers_.erase(it);
3511 } 3511 }
3512 3512
3513 } // namespace cc 3513 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698