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

Unified Diff: cc/resources/resource_update_controller.cc

Issue 26880010: gfx: Add FrameTime and DisplayTime classes (Closed) Base URL: http://git.chromium.org/chromium/src.git@checkHighResNow4
Patch Set: WIP Created 7 years, 2 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/resources/resource_update_controller.h ('k') | cc/scheduler/frame_rate_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_update_controller.cc
diff --git a/cc/resources/resource_update_controller.cc b/cc/resources/resource_update_controller.cc
index 59c536b0844b495712447d1ec17c31c627915b85..29fa4dd258a9473b758fc90909768faa80d5d3ce 100644
--- a/cc/resources/resource_update_controller.cc
+++ b/cc/resources/resource_update_controller.cc
@@ -56,7 +56,7 @@ ResourceUpdateController::ResourceUpdateController(
ResourceUpdateController::~ResourceUpdateController() {}
void ResourceUpdateController::PerformMoreUpdates(
- base::TimeTicks time_limit) {
+ gfx::FrameTime time_limit) {
time_limit_ = time_limit;
// Update already in progress.
@@ -113,7 +113,7 @@ void ResourceUpdateController::OnTimerFired() {
client_->ReadyToFinalizeTextureUpdates();
}
-base::TimeTicks ResourceUpdateController::Now() const {
+gfx::FrameTime ResourceUpdateController::Now() const {
return gfx::FrameTime::Now();
}
@@ -142,7 +142,8 @@ bool ResourceUpdateController::UpdateMoreTexturesIfEnoughTimeRemaining() {
if (!time_limit_.is_null()) {
// Estimated completion time of all pending updates.
- base::TimeTicks completion_time = Now() + PendingUpdateTime();
+ gfx::FrameTime completion_time =
+ Now() + PendingUpdateTime();
// Time remaining based on current completion estimate.
base::TimeDelta time_remaining = time_limit_ - completion_time;
« no previous file with comments | « cc/resources/resource_update_controller.h ('k') | cc/scheduler/frame_rate_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698