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.
5 #include "ui/display/chromeos/x11/display_snapshot_x11.h"
7 #include "base/strings/stringprintf.h"
8 #include "ui/display/chromeos/x11/display_mode_x11.h"
12 DisplaySnapshotX11::DisplaySnapshotX11(
14 bool has_proper_display_id
,
15 const gfx::Point
& origin
,
16 const gfx::Size
& physical_size
,
17 DisplayConnectionType type
,
18 bool is_aspect_preserving_scaling
,
20 std::string display_name
,
21 const std::vector
<const DisplayMode
*>& modes
,
22 const DisplayMode
* current_mode
,
23 const DisplayMode
* native_mode
,
27 : DisplaySnapshot(display_id
,
28 has_proper_display_id
,
32 is_aspect_preserving_scaling
,
42 DisplaySnapshotX11::~DisplaySnapshotX11() {}
44 std::string
DisplaySnapshotX11::ToString() const {
45 return base::StringPrintf(
46 "[type=%d, output=%ld, crtc=%ld, mode=%ld, dim=%dx%d]",
51 ? static_cast<const DisplayModeX11
*>(current_mode_
)->mode_id()
53 physical_size_
.width(),
54 physical_size_
.height());