Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_backend.cpp
Show All 25 Lines | |||||
26 | #include "cursor.h" | 26 | #include "cursor.h" | ||
27 | #include "logging.h" | 27 | #include "logging.h" | ||
28 | #include "logind.h" | 28 | #include "logind.h" | ||
29 | #include "main.h" | 29 | #include "main.h" | ||
30 | #include "scene_qpainter_drm_backend.h" | 30 | #include "scene_qpainter_drm_backend.h" | ||
31 | #include "screens_drm.h" | 31 | #include "screens_drm.h" | ||
32 | #include "udev.h" | 32 | #include "udev.h" | ||
33 | #include "wayland_server.h" | 33 | #include "wayland_server.h" | ||
34 | #include <colorcorrection/gammaramp.h> | | |||
35 | #if HAVE_GBM | 34 | #if HAVE_GBM | ||
36 | #include "egl_gbm_backend.h" | 35 | #include "egl_gbm_backend.h" | ||
37 | #include <gbm.h> | 36 | #include <gbm.h> | ||
38 | #endif | 37 | #endif | ||
39 | // KWayland | 38 | // KWayland | ||
40 | #include <KWayland/Server/seat_interface.h> | 39 | #include <KWayland/Server/seat_interface.h> | ||
41 | #include <KWayland/Server/outputconfiguration_interface.h> | 40 | #include <KWayland/Server/outputconfiguration_interface.h> | ||
42 | // KF5 | 41 | // KF5 | ||
▲ Show 20 Lines • Show All 732 Lines • ▼ Show 20 Line(s) | |||||
775 | { | 774 | { | ||
776 | #if HAVE_GBM | 775 | #if HAVE_GBM | ||
777 | return QVector<CompositingType>{OpenGLCompositing, QPainterCompositing}; | 776 | return QVector<CompositingType>{OpenGLCompositing, QPainterCompositing}; | ||
778 | #else | 777 | #else | ||
779 | return QVector<CompositingType>{QPainterCompositing}; | 778 | return QVector<CompositingType>{QPainterCompositing}; | ||
780 | #endif | 779 | #endif | ||
781 | } | 780 | } | ||
782 | 781 | | |||
783 | int DrmBackend::gammaRampSize(int screen) const | | |||
784 | { | | |||
785 | if (m_outputs.size() <= screen) { | | |||
786 | return 0; | | |||
787 | } | | |||
788 | auto *o = static_cast<DrmOutput*>(m_outputs.at(screen)); | | |||
789 | return o->m_crtc->getGammaRampSize(); | | |||
790 | } | | |||
791 | | ||||
792 | bool DrmBackend::setGammaRamp(int screen, ColorCorrect::GammaRamp &gamma) | | |||
793 | { | | |||
794 | if (m_outputs.size() <= screen) { | | |||
795 | return false; | | |||
796 | } | | |||
797 | auto *o = static_cast<DrmOutput*>(m_outputs.at(screen)); | | |||
798 | return o->m_crtc->setGammaRamp(gamma); | | |||
799 | } | | |||
800 | | ||||
801 | QString DrmBackend::supportInformation() const | 782 | QString DrmBackend::supportInformation() const | ||
802 | { | 783 | { | ||
803 | QString supportInfo; | 784 | QString supportInfo; | ||
804 | QDebug s(&supportInfo); | 785 | QDebug s(&supportInfo); | ||
805 | s.nospace(); | 786 | s.nospace(); | ||
806 | s << "Name: " << "DRM" << endl; | 787 | s << "Name: " << "DRM" << endl; | ||
807 | s << "Active: " << m_active << endl; | 788 | s << "Active: " << m_active << endl; | ||
808 | s << "Atomic Mode Setting: " << m_atomicModeSetting << endl; | 789 | s << "Atomic Mode Setting: " << m_atomicModeSetting << endl; | ||
809 | return supportInfo; | 790 | return supportInfo; | ||
810 | } | 791 | } | ||
811 | 792 | | |||
812 | } | 793 | } |