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

Side by Side Diff: ui/display/chromeos/display_snapshot_virtual.cc

Issue 1182063002: Add support for more advanced color correction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@qcms-fixed-point-gamma
Patch Set: Rebase after quirks changes Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/display/chromeos/display_snapshot_virtual.h" 5 #include "ui/display/chromeos/display_snapshot_virtual.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "ui/display/types/display_mode.h" 10 #include "ui/display/types/display_mode.h"
(...skipping 10 matching lines...) Expand all
21 DisplaySnapshotVirtual::DisplaySnapshotVirtual(int64_t display_id, 21 DisplaySnapshotVirtual::DisplaySnapshotVirtual(int64_t display_id,
22 const gfx::Size& display_size) 22 const gfx::Size& display_size)
23 : DisplaySnapshot(display_id, 23 : DisplaySnapshot(display_id,
24 gfx::Point(0, 0), 24 gfx::Point(0, 0),
25 // Calculate physical size assuming 96dpi display. 25 // Calculate physical size assuming 96dpi display.
26 gfx::Size(display_size.width() * kVirtualDisplayPitchMM, 26 gfx::Size(display_size.width() * kVirtualDisplayPitchMM,
27 display_size.height() * kVirtualDisplayPitchMM), 27 display_size.height() * kVirtualDisplayPitchMM),
28 DISPLAY_CONNECTION_TYPE_VIRTUAL, 28 DISPLAY_CONNECTION_TYPE_VIRTUAL,
29 false, 29 false,
30 false, 30 false,
31 false,
31 "Virtual display", 32 "Virtual display",
32 base::FilePath(), 33 base::FilePath(),
33 std::vector<const DisplayMode*>(), 34 std::vector<const DisplayMode*>(),
34 std::vector<uint8_t>(), // Virtual displays have no EDID. 35 std::vector<uint8_t>(), // Virtual displays have no EDID.
35 nullptr, 36 nullptr,
36 nullptr) { 37 nullptr) {
37 mode_.reset(new DisplayMode(display_size, false, 30)); 38 mode_.reset(new DisplayMode(display_size, false, 30));
38 modes_.push_back(mode_.get()); 39 modes_.push_back(mode_.get());
39 40
40 native_mode_ = modes_.front(); 41 native_mode_ = modes_.front();
41 } 42 }
42 43
43 DisplaySnapshotVirtual::~DisplaySnapshotVirtual() {} 44 DisplaySnapshotVirtual::~DisplaySnapshotVirtual() {}
44 45
45 std::string DisplaySnapshotVirtual::ToString() const { 46 std::string DisplaySnapshotVirtual::ToString() const {
46 return base::StringPrintf( 47 return base::StringPrintf(
47 "Virtual id=%" PRId64 " current_mode=%s physical_size=%s", display_id_, 48 "Virtual id=%" PRId64 " current_mode=%s physical_size=%s", display_id_,
48 current_mode_ ? current_mode_->ToString().c_str() : "nullptr", 49 current_mode_ ? current_mode_->ToString().c_str() : "nullptr",
49 physical_size_.ToString().c_str()); 50 physical_size_.ToString().c_str());
50 } 51 }
51 52
52 } // namespace ui 53 } // namespace ui
OLDNEW
« no previous file with comments | « ui/display/chromeos/display_configurator.cc ('k') | ui/display/chromeos/test/action_logger_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698