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

Unified Diff: cc/trees/proxy_impl.cc

Issue 2061273002: cc: Make BackToBackBeginFrameSource a SyntheticBeginFrameSource. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: syntheticbeginframesource: deleted Created 4 years, 6 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
Index: cc/trees/proxy_impl.cc
diff --git a/cc/trees/proxy_impl.cc b/cc/trees/proxy_impl.cc
index f0f1c71ec00506dfe48dc76b44cbecba1b0ea6a6..1bd55fcf6ddcf71e3935bd5cef84488f526a117b 100644
--- a/cc/trees/proxy_impl.cc
+++ b/cc/trees/proxy_impl.cc
@@ -19,6 +19,7 @@
#include "cc/output/context_provider.h"
#include "cc/output/output_surface.h"
#include "cc/scheduler/compositor_timing_history.h"
+#include "cc/scheduler/delay_based_time_source.h"
#include "cc/trees/layer_tree_host.h"
#include "cc/trees/layer_tree_impl.h"
#include "cc/trees/task_runner_provider.h"
@@ -90,9 +91,9 @@ ProxyImpl::ProxyImpl(
frame_source = unthrottled_begin_frame_source_.get();
}
if (!frame_source) {
- synthetic_begin_frame_source_.reset(new SyntheticBeginFrameSource(
- task_runner_provider_->ImplThreadTaskRunner(),
- BeginFrameArgs::DefaultInterval()));
+ synthetic_begin_frame_source_.reset(
+ new SyntheticBeginFrameSource(base::MakeUnique<DelayBasedTimeSource>(
+ task_runner_provider_->ImplThreadTaskRunner())));
frame_source = synthetic_begin_frame_source_.get();
}
scheduler_ =
@@ -305,14 +306,8 @@ void ProxyImpl::DidLoseOutputSurfaceOnImplThread() {
void ProxyImpl::CommitVSyncParameters(base::TimeTicks timebase,
base::TimeDelta interval) {
DCHECK(IsImplThread());
- if (!synthetic_begin_frame_source_)
- return;
-
- if (interval.is_zero()) {
- // TODO(brianderson): We should not be receiving 0 intervals.
- interval = BeginFrameArgs::DefaultInterval();
- }
- synthetic_begin_frame_source_->OnUpdateVSyncParameters(timebase, interval);
+ if (synthetic_begin_frame_source_)
+ synthetic_begin_frame_source_->OnUpdateVSyncParameters(timebase, interval);
}
void ProxyImpl::SetBeginFrameSource(BeginFrameSource* source) {

Powered by Google App Engine
This is Rietveld 408576698