1// Copyright 2014 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "ui/display/types/display_mode.h"
6
7#include "base/strings/stringprintf.h"
8
9namespace ui {
10
11DisplayMode::DisplayMode(const gfx::Size& size,
12                         bool interlaced,
13                         float refresh_rate)
14    : size_(size),
15      is_interlaced_(interlaced),
16      refresh_rate_(refresh_rate) {}
17
18DisplayMode::~DisplayMode() {}
19
20std::string DisplayMode::ToString() const {
21  return base::StringPrintf("[%dx%d %srate=%f]",
22                            size_.width(),
23                            size_.height(),
24                            is_interlaced_ ? "interlaced " : "",
25                            refresh_rate_);
26}
27
28}  // namespace ui
29