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

Unified Diff: ui/ozone/platform/drm/gpu/drm_display_mode.cc

Issue 1129923004: [1/2][Ozone-Drm] Refactor GPU display management (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@handle-display-init2
Patch Set: . Created 5 years, 7 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/drm/gpu/drm_display_mode.h ('k') | ui/ozone/platform/drm/gpu/drm_display_snapshot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/ozone/platform/drm/gpu/drm_display_mode.cc
diff --git a/ui/ozone/platform/drm/gpu/drm_display_mode.cc b/ui/ozone/platform/drm/gpu/drm_display_mode.cc
deleted file mode 100644
index b97d2d8cbf94695ee9e66fdf445dffb68d3b53ee..0000000000000000000000000000000000000000
--- a/ui/ozone/platform/drm/gpu/drm_display_mode.cc
+++ /dev/null
@@ -1,34 +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/drm/gpu/drm_display_mode.h"
-
-namespace ui {
-
-namespace {
-
-float GetRefreshRate(const drmModeModeInfo& mode) {
- if (!mode.htotal || !mode.vtotal)
- return mode.vrefresh;
-
- float clock = mode.clock;
- float htotal = mode.htotal;
- float vtotal = mode.vtotal;
-
- return (clock * 1000.0f) / (htotal * vtotal);
-}
-
-} // namespace
-
-DrmDisplayMode::DrmDisplayMode(const drmModeModeInfo& mode)
- : DisplayMode(gfx::Size(mode.hdisplay, mode.vdisplay),
- mode.flags & DRM_MODE_FLAG_INTERLACE,
- GetRefreshRate(mode)),
- mode_info_(mode) {
-}
-
-DrmDisplayMode::~DrmDisplayMode() {
-}
-
-} // namespace ui
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_display_mode.h ('k') | ui/ozone/platform/drm/gpu/drm_display_snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698