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

Unified Diff: cc/scheduler/frame_rate_controller.cc

Issue 16304003: Unified OutputSurface::SwapBuffers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to 205473 Created 7 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
« no previous file with comments | « cc/scheduler/frame_rate_controller.h ('k') | cc/scheduler/scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/scheduler/frame_rate_controller.cc
diff --git a/cc/scheduler/frame_rate_controller.cc b/cc/scheduler/frame_rate_controller.cc
index bcb12d200dbb51e506dc733a8adae0e18ea190f0..b4f1272e2d2c52513365371e2fa7d757e194c3d3 100644
--- a/cc/scheduler/frame_rate_controller.cc
+++ b/cc/scheduler/frame_rate_controller.cc
@@ -37,7 +37,6 @@ FrameRateController::FrameRateController(scoped_refptr<TimeSource> timer)
max_frames_pending_(0),
time_source_(timer),
active_(false),
- swap_buffers_complete_supported_(true),
is_time_source_throttling_(true),
weak_factory_(this),
thread_(NULL) {
@@ -51,7 +50,6 @@ FrameRateController::FrameRateController(Thread* thread)
num_frames_pending_(0),
max_frames_pending_(0),
active_(false),
- swap_buffers_complete_supported_(true),
is_time_source_throttling_(false),
weak_factory_(this),
thread_(thread) {}
@@ -88,14 +86,6 @@ void FrameRateController::SetTimebaseAndInterval(base::TimeTicks timebase,
time_source_->SetTimebaseAndInterval(timebase, interval);
}
-bool FrameRateController::swap_buffers_complete_supported() const {
- return swap_buffers_complete_supported_;
-}
-
-void FrameRateController::SetSwapBuffersCompleteSupported(bool supported) {
- swap_buffers_complete_supported_ = supported;
-}
-
void FrameRateController::OnTimerTick() {
DCHECK(active_);
@@ -107,8 +97,7 @@ void FrameRateController::OnTimerTick() {
if (client_)
client_->BeginFrame(throttled);
- if (swap_buffers_complete_supported_ && !is_time_source_throttling_ &&
- !throttled)
+ if (!is_time_source_throttling_ && !throttled)
PostManualTick();
}
@@ -122,15 +111,10 @@ void FrameRateController::PostManualTick() {
void FrameRateController::ManualTick() { OnTimerTick(); }
void FrameRateController::DidSwapBuffers() {
- if (swap_buffers_complete_supported_)
- num_frames_pending_++;
- else if (!is_time_source_throttling_)
- PostManualTick();
+ num_frames_pending_++;
}
void FrameRateController::DidSwapBuffersComplete() {
- DCHECK(swap_buffers_complete_supported_);
-
DCHECK_GT(num_frames_pending_, 0);
num_frames_pending_--;
if (!is_time_source_throttling_)
« no previous file with comments | « cc/scheduler/frame_rate_controller.h ('k') | cc/scheduler/scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698