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

Side by Side Diff: ui/ozone/platform/drm/gpu/drm_display.cc

Issue 1438343002: Remove deprecated ScopedVector usage from ui/ozone and ui/events/ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ozone/platform/drm/gpu/drm_display.h" 5 #include "ui/ozone/platform/drm/gpu/drm_display.h"
6 6
7 #include <xf86drmMode.h> 7 #include <xf86drmMode.h>
8 8
9 #include "ui/display/types/gamma_ramp_rgb_entry.h" 9 #include "ui/display/types/gamma_ramp_rgb_entry.h"
10 #include "ui/ozone/platform/drm/common/drm_util.h" 10 #include "ui/ozone/platform/drm/common/drm_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 } // namespace 78 } // namespace
79 79
80 DrmDisplay::DrmDisplay(ScreenManager* screen_manager, 80 DrmDisplay::DrmDisplay(ScreenManager* screen_manager,
81 const scoped_refptr<DrmDevice>& drm) 81 const scoped_refptr<DrmDevice>& drm)
82 : screen_manager_(screen_manager), drm_(drm) { 82 : screen_manager_(screen_manager), drm_(drm) {
83 } 83 }
84 84
85 DrmDisplay::~DrmDisplay() { 85 DrmDisplay::~DrmDisplay() {
86 } 86 }
87 87
88 DisplaySnapshot_Params DrmDisplay::Update(HardwareDisplayControllerInfo* info, 88 DisplaySnapshot_Params DrmDisplay::Update(
89 size_t device_index) { 89 const HardwareDisplayControllerInfo& info,
90 size_t device_index) {
90 DisplaySnapshot_Params params = 91 DisplaySnapshot_Params params =
91 CreateDisplaySnapshotParams(info, drm_->get_fd(), device_index, origin_); 92 CreateDisplaySnapshotParams(info, drm_->get_fd(), device_index, origin_);
92 crtc_ = info->crtc()->crtc_id; 93 crtc_ = info.crtc()->crtc_id;
93 connector_ = info->connector()->connector_id; 94 connector_ = info.connector()->connector_id;
94 display_id_ = params.display_id; 95 display_id_ = params.display_id;
95 modes_ = GetDrmModeVector(info->connector()); 96 modes_ = GetDrmModeVector(info.connector());
96 return params; 97 return params;
97 } 98 }
98 99
99 bool DrmDisplay::Configure(const drmModeModeInfo* mode, 100 bool DrmDisplay::Configure(const drmModeModeInfo* mode,
100 const gfx::Point& origin) { 101 const gfx::Point& origin) {
101 VLOG(1) << "DRM configuring: device=" << drm_->device_path().value() 102 VLOG(1) << "DRM configuring: device=" << drm_->device_path().value()
102 << " crtc=" << crtc_ << " connector=" << connector_ 103 << " crtc=" << crtc_ << " connector=" << connector_
103 << " origin=" << origin.ToString() 104 << " origin=" << origin.ToString()
104 << " size=" << (mode ? GetDrmModeSize(*mode).ToString() : "0x0"); 105 << " size=" << (mode ? GetDrmModeSize(*mode).ToString() : "0x0");
105 106
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 } 171 }
171 172
172 void DrmDisplay::SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut) { 173 void DrmDisplay::SetGammaRamp(const std::vector<GammaRampRGBEntry>& lut) {
173 if (!drm_->SetGammaRamp(crtc_, lut)) { 174 if (!drm_->SetGammaRamp(crtc_, lut)) {
174 LOG(ERROR) << "Failed to set gamma ramp for display: crtc_id = " << crtc_ 175 LOG(ERROR) << "Failed to set gamma ramp for display: crtc_id = " << crtc_
175 << " size = " << lut.size(); 176 << " size = " << lut.size();
176 } 177 }
177 } 178 }
178 179
179 } // namespace ui 180 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698