Correctly track texture cleared state for sharing
[chromium-blink-merge.git] / ui / display / chromeos / x11 / display_snapshot_x11.cc
blobbb3e6105cf09f3359d4649ec995b729df27c71cb
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"
10 namespace ui {
12 DisplaySnapshotX11::DisplaySnapshotX11(
13 int64_t display_id,
14 const gfx::Point& origin,
15 const gfx::Size& physical_size,
16 DisplayConnectionType type,
17 bool is_aspect_preserving_scaling,
18 bool has_overscan,
19 std::string display_name,
20 const std::vector<const DisplayMode*>& modes,
21 const DisplayMode* current_mode,
22 const DisplayMode* native_mode,
23 RROutput output,
24 RRCrtc crtc,
25 int index)
26 : DisplaySnapshot(display_id,
27 origin,
28 physical_size,
29 type,
30 is_aspect_preserving_scaling,
31 has_overscan,
32 display_name,
33 modes,
34 current_mode,
35 native_mode),
36 output_(output),
37 crtc_(crtc),
38 index_(index) {}
40 DisplaySnapshotX11::~DisplaySnapshotX11() {}
42 std::string DisplaySnapshotX11::ToString() const {
43 return base::StringPrintf(
44 "[type=%d, output=%ld, crtc=%ld, mode=%ld, dim=%dx%d]",
45 type_,
46 output_,
47 crtc_,
48 current_mode_
49 ? static_cast<const DisplayModeX11*>(current_mode_)->mode_id()
50 : 0,
51 physical_size_.width(),
52 physical_size_.height());
55 } // namespace ui