Changeset View
Changeset View
Standalone View
Standalone View
platformsupport/scenes/opengl/abstract_egl_backend.cpp
Show All 14 Lines | |||||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #include "abstract_egl_backend.h" | 20 | #include "abstract_egl_backend.h" | ||
21 | #include "linux_dmabuf.h" | 21 | #include "linux_dmabuf.h" | ||
22 | #include "texture.h" | 22 | #include "texture.h" | ||
23 | #include "abstract_output.h" | ||||
23 | #include "composite.h" | 24 | #include "composite.h" | ||
24 | #include "egl_context_attribute_builder.h" | 25 | #include "egl_context_attribute_builder.h" | ||
25 | #include "options.h" | 26 | #include "options.h" | ||
26 | #include "platform.h" | 27 | #include "platform.h" | ||
27 | #include "scene.h" | 28 | #include "scene.h" | ||
28 | #include "wayland_server.h" | 29 | #include "wayland_server.h" | ||
zzag: Please move it before "composite.h" | |||||
29 | #include <KWayland/Server/buffer_interface.h> | 30 | #include <KWayland/Server/buffer_interface.h> | ||
30 | #include <KWayland/Server/display.h> | 31 | #include <KWayland/Server/display.h> | ||
31 | #include <KWayland/Server/surface_interface.h> | 32 | #include <KWayland/Server/surface_interface.h> | ||
32 | // kwin libs | 33 | // kwin libs | ||
zzag: This is a kwin core include, thus it should go above. | |||||
33 | #include <logging.h> | 34 | #include <logging.h> | ||
34 | #include <kwinglplatform.h> | 35 | #include <kwinglplatform.h> | ||
35 | #include <kwinglutils.h> | 36 | #include <kwinglutils.h> | ||
36 | // Qt | 37 | // Qt | ||
37 | #include <QOpenGLContext> | 38 | #include <QOpenGLContext> | ||
38 | #include <QOpenGLFramebufferObject> | 39 | #include <QOpenGLFramebufferObject> | ||
39 | 40 | | |||
40 | #include <memory> | 41 | #include <memory> | ||
▲ Show 20 Lines • Show All 550 Lines • ▼ Show 20 Line(s) | 587 | { | |||
591 | m_size = fbo->size(); | 592 | m_size = fbo->size(); | ||
592 | q->setWrapMode(GL_CLAMP_TO_EDGE); | 593 | q->setWrapMode(GL_CLAMP_TO_EDGE); | ||
593 | q->setFilter(GL_LINEAR); | 594 | q->setFilter(GL_LINEAR); | ||
594 | q->setYInverted(false); | 595 | q->setYInverted(false); | ||
595 | updateMatrix(); | 596 | updateMatrix(); | ||
596 | return true; | 597 | return true; | ||
597 | } | 598 | } | ||
598 | 599 | | |||
600 | | ||||
601 | QRect AbstractEglBackend::orientateRect(AbstractOutput *output, const QRect &r) | ||||
602 | { | ||||
603 | if (output->softwareRotationAngle() != 0) { | ||||
604 | QTransform m; | ||||
605 | m.rotate(-output->softwareRotationAngle(), Qt::ZAxis); | ||||
606 | return QRect(m.map(r.topLeft()), r.size()); | ||||
607 | } | ||||
608 | return r; | ||||
609 | } | ||||
610 | | ||||
599 | } | 611 | } | ||
600 | 612 | |
Please move it before "composite.h"