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

Unified Diff: ui/ozone/platform/dri/dri_vsync_provider.cc

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 | « ui/ozone/platform/dri/dri_vsync_provider.h ('k') | ui/ozone/platform/dri/dri_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/dri/dri_vsync_provider.cc
diff --git a/ui/ozone/platform/dri/dri_vsync_provider.cc b/ui/ozone/platform/dri/dri_vsync_provider.cc
deleted file mode 100644
index bf88c5d94ded27d4f06d67feb51905effa016e0a..0000000000000000000000000000000000000000
--- a/ui/ozone/platform/dri/dri_vsync_provider.cc
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "ui/ozone/platform/dri/dri_vsync_provider.h"
-
-#include "base/time/time.h"
-#include "ui/ozone/platform/dri/dri_window_delegate.h"
-#include "ui/ozone/platform/dri/hardware_display_controller.h"
-
-namespace ui {
-
-DriVSyncProvider::DriVSyncProvider(DriWindowDelegate* window_delegate)
- : window_delegate_(window_delegate) {
-}
-
-DriVSyncProvider::~DriVSyncProvider() {}
-
-void DriVSyncProvider::GetVSyncParameters(const UpdateVSyncCallback& callback) {
- HardwareDisplayController* controller = window_delegate_->GetController();
- if (!controller)
- return;
-
- // The value is invalid, so we can't update the parameters.
- if (controller->GetTimeOfLastFlip() == 0 ||
- controller->get_mode().vrefresh == 0)
- return;
-
- // Stores the time of the last refresh.
- base::TimeTicks timebase =
- base::TimeTicks::FromInternalValue(controller->GetTimeOfLastFlip());
- // Stores the refresh rate.
- base::TimeDelta interval =
- base::TimeDelta::FromSeconds(1) / controller->get_mode().vrefresh;
-
- callback.Run(timebase, interval);
-}
-
-} // namespace ui
« no previous file with comments | « ui/ozone/platform/dri/dri_vsync_provider.h ('k') | ui/ozone/platform/dri/dri_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698