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

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

Issue 845383002: [Ozone-DRI] Make sure the display configuration is up-to-date on the GPU (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 11 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/ozone/platform/dri/dri_gpu_platform_support.h" 5 #include "ui/ozone/platform/dri/dri_gpu_platform_support.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/thread_task_runner_handle.h" 8 #include "base/thread_task_runner_handle.h"
9 #include "ipc/ipc_message_macros.h" 9 #include "ipc/ipc_message_macros.h"
10 #include "ui/display/types/display_mode.h" 10 #include "ui/display/types/display_mode.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 mode_param.refresh_rate); 298 mode_param.refresh_rate);
299 299
300 if (!mode) { 300 if (!mode) {
301 LOG(ERROR) << "Failed to find mode: size=" << mode_param.size.ToString() 301 LOG(ERROR) << "Failed to find mode: size=" << mode_param.size.ToString()
302 << " is_interlaced=" << mode_param.is_interlaced 302 << " is_interlaced=" << mode_param.is_interlaced
303 << " refresh_rate=" << mode_param.refresh_rate; 303 << " refresh_rate=" << mode_param.refresh_rate;
304 sender_->Send(new OzoneHostMsg_DisplayConfigured(id, false)); 304 sender_->Send(new OzoneHostMsg_DisplayConfigured(id, false));
305 return; 305 return;
306 } 306 }
307 307
308 sender_->Send(new OzoneHostMsg_DisplayConfigured( 308 bool success = ndd_->Configure(*display, mode, origin);
309 id, ndd_->Configure(*display, mode, origin))); 309 if (success) {
310 display->set_origin(origin);
311 display->set_current_mode(mode);
312 }
313
314 sender_->Send(new OzoneHostMsg_DisplayConfigured(id, success));
310 } 315 }
311 316
312 void DriGpuPlatformSupport::OnDisableNativeDisplay(int64_t id) { 317 void DriGpuPlatformSupport::OnDisableNativeDisplay(int64_t id) {
313 DisplaySnapshot* display = ndd_->FindDisplaySnapshot(id); 318 DisplaySnapshot* display = ndd_->FindDisplaySnapshot(id);
314 bool success = false; 319 bool success = false;
315 if (display) 320 if (display)
316 success = ndd_->Configure(*display, NULL, gfx::Point()); 321 success = ndd_->Configure(*display, NULL, gfx::Point());
317 else 322 else
318 LOG(ERROR) << "There is no display with ID " << id; 323 LOG(ERROR) << "There is no display with ID " << id;
319 324
(...skipping 19 matching lines...) Expand all
339 void DriGpuPlatformSupport::RelinquishGpuResources( 344 void DriGpuPlatformSupport::RelinquishGpuResources(
340 const base::Closure& callback) { 345 const base::Closure& callback) {
341 callback.Run(); 346 callback.Run();
342 } 347 }
343 348
344 IPC::MessageFilter* DriGpuPlatformSupport::GetMessageFilter() { 349 IPC::MessageFilter* DriGpuPlatformSupport::GetMessageFilter() {
345 return filter_.get(); 350 return filter_.get();
346 } 351 }
347 352
348 } // namespace ui 353 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/dri/display_snapshot_dri.cc ('k') | ui/ozone/platform/dri/native_display_delegate_dri.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698