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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 218633010: cc: Handle retroactive BeginFrames in the Scheduler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@compositorVsyncDisable
Patch Set: fix comment typo Created 6 years, 8 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 96d05363617bb8094c43e5b43e16b27bfaff0cd6..0eb8f5c2bc745ea60daadaf4b3c2ce9857a4649b 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1282,8 +1282,8 @@ void LayerTreeHostImpl::SetNeedsRedrawRect(const gfx::Rect& damage_rect) {
client_->SetNeedsRedrawRectOnImplThread(damage_rect);
}
-void LayerTreeHostImpl::BeginImplFrame(const BeginFrameArgs& args) {
- client_->BeginImplFrame(args);
+void LayerTreeHostImpl::BeginFrame(const BeginFrameArgs& args) {
+ client_->BeginFrame(args);
}
void LayerTreeHostImpl::DidSwapBuffers() {
@@ -1499,9 +1499,15 @@ bool LayerTreeHostImpl::SwapBuffers(const LayerTreeHostImpl::FrameData& frame) {
return true;
}
-void LayerTreeHostImpl::SetNeedsBeginImplFrame(bool enable) {
+void LayerTreeHostImpl::SetNeedsBeginFrame(bool enable) {
if (output_surface_)
- output_surface_->SetNeedsBeginImplFrame(enable);
+ output_surface_->SetNeedsBeginFrame(enable);
+}
+
+void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) {
+ // Sample the frame time now. This time will be used for updating animations
+ // when we draw.
+ UpdateCurrentFrameTime();
}
gfx::SizeF LayerTreeHostImpl::ComputeInnerViewportContainerSize() const {
@@ -1879,14 +1885,14 @@ bool LayerTreeHostImpl::InitializeRenderer(
GetRendererCapabilities().allow_rasterize_on_demand);
}
- // Setup BeginImplFrameEmulation if it's not supported natively
+ // Setup BeginFrameEmulation if it's not supported natively
if (!settings_.begin_impl_frame_scheduling_enabled) {
const base::TimeDelta display_refresh_interval =
base::TimeDelta::FromMicroseconds(
base::Time::kMicrosecondsPerSecond /
settings_.refresh_rate);
- output_surface->InitializeBeginImplFrameEmulation(
+ output_surface->InitializeBeginFrameEmulation(
proxy_->ImplThreadTaskRunner(),
settings_.throttle_frame_production,
display_refresh_interval);
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698