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

Side by Side Diff: ui/ozone/platform/dri/screen_manager.cc

Issue 552553002: Fix the uses of T* conversion operator from scoped_refptr<T> which is now removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
« no previous file with comments | « ui/ozone/platform/dri/hardware_display_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ozone/platform/dri/screen_manager.h" 5 #include "ui/ozone/platform/dri/screen_manager.h"
6 6
7 #include <xf86drmMode.h> 7 #include <xf86drmMode.h>
8 8
9 #include "ui/gfx/geometry/point.h" 9 #include "ui/gfx/geometry/point.h"
10 #include "ui/gfx/geometry/rect.h" 10 #include "ui/gfx/geometry/rect.h"
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 168
169 bool ScreenManager::ModesetDisplayController( 169 bool ScreenManager::ModesetDisplayController(
170 HardwareDisplayController* controller, 170 HardwareDisplayController* controller,
171 const gfx::Point& origin, 171 const gfx::Point& origin,
172 const drmModeModeInfo& mode) { 172 const drmModeModeInfo& mode) {
173 controller->set_origin(origin); 173 controller->set_origin(origin);
174 // Create a surface suitable for the current controller. 174 // Create a surface suitable for the current controller.
175 scoped_refptr<ScanoutBuffer> buffer = 175 scoped_refptr<ScanoutBuffer> buffer =
176 buffer_generator_->Create(gfx::Size(mode.hdisplay, mode.vdisplay)); 176 buffer_generator_->Create(gfx::Size(mode.hdisplay, mode.vdisplay));
177 177
178 if (!buffer) { 178 if (!buffer.get()) {
179 LOG(ERROR) << "Failed to create scanout buffer"; 179 LOG(ERROR) << "Failed to create scanout buffer";
180 return false; 180 return false;
181 } 181 }
182 182
183 if (!controller->Modeset(OverlayPlane(buffer), mode)) { 183 if (!controller->Modeset(OverlayPlane(buffer), mode)) {
184 LOG(ERROR) << "Failed to modeset controller"; 184 LOG(ERROR) << "Failed to modeset controller";
185 return false; 185 return false;
186 } 186 }
187 187
188 return true; 188 return true;
(...skipping 14 matching lines...) Expand all
203 203
204 // When things go wrong revert back to the previous configuration since 204 // When things go wrong revert back to the previous configuration since
205 // it is expected that the configuration would not have changed if 205 // it is expected that the configuration would not have changed if
206 // things fail. 206 // things fail.
207 (*original)->AddCrtc((*mirror)->RemoveCrtc(crtc)); 207 (*original)->AddCrtc((*mirror)->RemoveCrtc(crtc));
208 (*original)->Enable(); 208 (*original)->Enable();
209 return false; 209 return false;
210 } 210 }
211 211
212 } // namespace ui 212 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/hardware_display_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698