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

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

Issue 1585463002: Use sysroot for chromeos builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.h ('k') | ui/ozone/platform/drm/gpu/mock_drm_device.h » ('j') | 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/drm/gpu/drm_device.h" 5 #include "ui/ozone/platform/drm/gpu/drm_device.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <sys/mman.h> 8 #include <sys/mman.h>
9 #include <unistd.h> 9 #include <unistd.h>
10 #include <xf86drm.h> 10 #include <xf86drm.h>
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 reinterpret_cast<void*>(id))) { 490 reinterpret_cast<void*>(id))) {
491 if (page_flip_event_requested) 491 if (page_flip_event_requested)
492 page_flip_manager_->RegisterCallback(id, crtc_count, callback); 492 page_flip_manager_->RegisterCallback(id, crtc_count, callback);
493 493
494 return true; 494 return true;
495 } 495 }
496 #endif // defined(USE_DRM_ATOMIC) 496 #endif // defined(USE_DRM_ATOMIC)
497 return false; 497 return false;
498 } 498 }
499 499
500 #if defined(DRM_CLIENT_CAP_UNIVERSAL_PLANES)
500 bool DrmDevice::SetCapability(uint64_t capability, uint64_t value) { 501 bool DrmDevice::SetCapability(uint64_t capability, uint64_t value) {
501 DCHECK(file_.IsValid()); 502 DCHECK(file_.IsValid());
502 return !drmSetClientCap(file_.GetPlatformFile(), capability, value); 503 return !drmSetClientCap(file_.GetPlatformFile(), capability, value);
503 } 504 }
505 #endif
504 506
505 bool DrmDevice::SetMaster() { 507 bool DrmDevice::SetMaster() {
506 TRACE_EVENT1("drm", "DrmDevice::SetMaster", "path", device_path_.value()); 508 TRACE_EVENT1("drm", "DrmDevice::SetMaster", "path", device_path_.value());
507 DCHECK(file_.IsValid()); 509 DCHECK(file_.IsValid());
508 return (drmSetMaster(file_.GetPlatformFile()) == 0); 510 return (drmSetMaster(file_.GetPlatformFile()) == 0);
509 } 511 }
510 512
511 bool DrmDevice::DropMaster() { 513 bool DrmDevice::DropMaster() {
512 TRACE_EVENT1("drm", "DrmDevice::DropMaster", "path", device_path_.value()); 514 TRACE_EVENT1("drm", "DrmDevice::DropMaster", "path", device_path_.value());
513 DCHECK(file_.IsValid()); 515 DCHECK(file_.IsValid());
(...skipping 22 matching lines...) Expand all
536 b.push_back(lut[i].b); 538 b.push_back(lut[i].b);
537 } 539 }
538 540
539 DCHECK(file_.IsValid()); 541 DCHECK(file_.IsValid());
540 TRACE_EVENT0("drm", "DrmDevice::SetGamma"); 542 TRACE_EVENT0("drm", "DrmDevice::SetGamma");
541 return (drmModeCrtcSetGamma(file_.GetPlatformFile(), crtc_id, r.size(), &r[0], 543 return (drmModeCrtcSetGamma(file_.GetPlatformFile(), crtc_id, r.size(), &r[0],
542 &g[0], &b[0]) == 0); 544 &g[0], &b[0]) == 0);
543 } 545 }
544 546
545 } // namespace ui 547 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/drm/gpu/drm_device.h ('k') | ui/ozone/platform/drm/gpu/mock_drm_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698