Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial implementation of decorations for EGL windows.
Change-Id: I7521e583bf18f3690ecc6baacd05a5e92e9fd890 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com> Reviewed-by: Andy Nichols <andy.nichols@digia.com>
- Loading branch information
Showing
18 changed files
with
559 additions
and
71 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandegldecoration.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/**************************************************************************** | ||
** | ||
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). | ||
** Contact: http://www.qt-project.org/legal | ||
** | ||
** This file is part of the plugins of the Qt Toolkit. | ||
** | ||
** $QT_BEGIN_LICENSE:LGPL$ | ||
** Commercial License Usage | ||
** Licensees holding valid commercial Qt licenses may use this file in | ||
** accordance with the commercial license agreement provided with the | ||
** Software or, alternatively, in accordance with the terms contained in | ||
** a written agreement between you and Digia. For licensing terms and | ||
** conditions see http://qt.digia.com/licensing. For further information | ||
** use the contact form at http://qt.digia.com/contact-us. | ||
** | ||
** GNU Lesser General Public License Usage | ||
** Alternatively, this file may be used under the terms of the GNU Lesser | ||
** General Public License version 2.1 as published by the Free Software | ||
** Foundation and appearing in the file LICENSE.LGPL included in the | ||
** packaging of this file. Please review the following information to | ||
** ensure the GNU Lesser General Public License version 2.1 requirements | ||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
** | ||
** In addition, as a special exception, Digia gives you certain additional | ||
** rights. These rights are described in the Digia Qt LGPL Exception | ||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
** | ||
** GNU General Public License Usage | ||
** Alternatively, this file may be used under the terms of the GNU | ||
** General Public License version 3.0 as published by the Free Software | ||
** Foundation and appearing in the file LICENSE.GPL included in the | ||
** packaging of this file. Please review the following information to | ||
** ensure the GNU General Public License version 3.0 requirements will be | ||
** met: http://www.gnu.org/copyleft/gpl.html. | ||
** | ||
** | ||
** $QT_END_LICENSE$ | ||
** | ||
****************************************************************************/ | ||
|
||
#include "qwaylandegldecoration.h" | ||
|
||
#include "qwaylandeglwindow.h" | ||
|
||
#include <QtGui/QPainter> | ||
#include <QtGui/QOpenGLPaintDevice> | ||
|
||
QWaylandEglDecoration::QWaylandEglDecoration(QWaylandEglWindow *window) | ||
: QWaylandDecoration(window) | ||
{ | ||
} | ||
|
||
QWaylandEglDecoration::~QWaylandEglDecoration() | ||
{ | ||
} | ||
|
||
void QWaylandEglDecoration::paintDecoration() | ||
{ | ||
glClearColor(backgroundColor().redF(), backgroundColor().greenF(), backgroundColor().blueF(), backgroundColor().alphaF()); | ||
glClear(GL_COLOR_BUFFER_BIT); | ||
|
||
QOpenGLPaintDevice device(window()->frameGeometry().size()); | ||
paint(&device); | ||
} |
59 changes: 59 additions & 0 deletions
59
src/plugins/platforms/wayland/gl_integration/wayland_egl/qwaylandegldecoration.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/**************************************************************************** | ||
** | ||
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). | ||
** Contact: http://www.qt-project.org/legal | ||
** | ||
** This file is part of the plugins of the Qt Toolkit. | ||
** | ||
** $QT_BEGIN_LICENSE:LGPL$ | ||
** Commercial License Usage | ||
** Licensees holding valid commercial Qt licenses may use this file in | ||
** accordance with the commercial license agreement provided with the | ||
** Software or, alternatively, in accordance with the terms contained in | ||
** a written agreement between you and Digia. For licensing terms and | ||
** conditions see http://qt.digia.com/licensing. For further information | ||
** use the contact form at http://qt.digia.com/contact-us. | ||
** | ||
** GNU Lesser General Public License Usage | ||
** Alternatively, this file may be used under the terms of the GNU Lesser | ||
** General Public License version 2.1 as published by the Free Software | ||
** Foundation and appearing in the file LICENSE.LGPL included in the | ||
** packaging of this file. Please review the following information to | ||
** ensure the GNU Lesser General Public License version 2.1 requirements | ||
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | ||
** | ||
** In addition, as a special exception, Digia gives you certain additional | ||
** rights. These rights are described in the Digia Qt LGPL Exception | ||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | ||
** | ||
** GNU General Public License Usage | ||
** Alternatively, this file may be used under the terms of the GNU | ||
** General Public License version 3.0 as published by the Free Software | ||
** Foundation and appearing in the file LICENSE.GPL included in the | ||
** packaging of this file. Please review the following information to | ||
** ensure the GNU General Public License version 3.0 requirements will be | ||
** met: http://www.gnu.org/copyleft/gpl.html. | ||
** | ||
** | ||
** $QT_END_LICENSE$ | ||
** | ||
****************************************************************************/ | ||
|
||
#ifndef QWAYLANDEGLDECORATION_H | ||
#define QWAYLANDEGLDECORATION_H | ||
|
||
#include "qwaylanddecoration.h" | ||
|
||
class QWaylandEglWindow; | ||
|
||
class QWaylandEglDecoration : public QWaylandDecoration | ||
{ | ||
public: | ||
QWaylandEglDecoration(QWaylandEglWindow *window); | ||
~QWaylandEglDecoration(); | ||
|
||
void paintDecoration(); | ||
|
||
}; | ||
|
||
#endif // QWAYLANDEGLDECORATION_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.