| OLD | NEW |
| 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> |
| 11 #include <xf86drmMode.h> | 11 #include <xf86drmMode.h> |
| 12 | 12 |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
| 16 #include "base/synchronization/waitable_event.h" | 16 #include "base/synchronization/waitable_event.h" |
| 17 #include "base/task_runner.h" | 17 #include "base/task_runner.h" |
| 18 #include "base/thread_task_runner_handle.h" | 18 #include "base/thread_task_runner_handle.h" |
| 19 #include "base/trace_event/trace_event.h" | 19 #include "base/trace_event/trace_event.h" |
| 20 #include "third_party/skia/include/core/SkImageInfo.h" | 20 #include "third_party/skia/include/core/SkImageInfo.h" |
| 21 #include "ui/display/types/gamma_ramp_rgb_entry.h" | 21 #include "ui/display/types/gamma_ramp_rgb_entry.h" |
| 22 #include "ui/ozone/platform/drm/gpu/drm_util.h" | 22 #include "ui/ozone/platform/drm/common/drm_util.h" |
| 23 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h" | 23 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_legacy.h" |
| 24 | 24 |
| 25 #if defined(USE_DRM_ATOMIC) | 25 #if defined(USE_DRM_ATOMIC) |
| 26 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h" | 26 #include "ui/ozone/platform/drm/gpu/hardware_display_plane_manager_atomic.h" |
| 27 #endif | 27 #endif |
| 28 | 28 |
| 29 namespace ui { | 29 namespace ui { |
| 30 | 30 |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| (...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 b.push_back(lut[i].b); | 607 b.push_back(lut[i].b); |
| 608 } | 608 } |
| 609 | 609 |
| 610 DCHECK(file_.IsValid()); | 610 DCHECK(file_.IsValid()); |
| 611 TRACE_EVENT0("drm", "DrmDevice::SetGamma"); | 611 TRACE_EVENT0("drm", "DrmDevice::SetGamma"); |
| 612 return (drmModeCrtcSetGamma(file_.GetPlatformFile(), crtc_id, r.size(), &r[0], | 612 return (drmModeCrtcSetGamma(file_.GetPlatformFile(), crtc_id, r.size(), &r[0], |
| 613 &g[0], &b[0]) == 0); | 613 &g[0], &b[0]) == 0); |
| 614 } | 614 } |
| 615 | 615 |
| 616 } // namespace ui | 616 } // namespace ui |
| OLD | NEW |