[platforms/hwcomposer] Make createOutput a non-static method

Summary:
there is no need for createOutput to be static, make it non-static,
this also fixes the build failure introduced in commit
02d3daf28a.

Test Plan: builds

Reviewers: #kwin, graesslin, davidedmundson

Reviewed By: davidedmundson

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D8430
This commit is contained in:
Bhushan Shah 2017-10-23 13:41:32 +05:30
parent 4ef7a572a1
commit 8729ff25c9
2 changed files with 5 additions and 3 deletions

View file

@ -27,14 +27,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "wayland_server.h" #include "wayland_server.h"
// KWayland // KWayland
#include <KWayland/Server/display.h> #include <KWayland/Server/display.h>
#include <KWayland/Server/output_interface.h>
#include <KWayland/Server/seat_interface.h> #include <KWayland/Server/seat_interface.h>
// Qt // Qt
#include <QKeyEvent> #include <QKeyEvent>
#include <QDBusConnection> #include <QDBusConnection>
// hybris/android // hybris/android
#include <hardware/hardware.h> #include <hardware/hardware.h>
#include <hardware/hwcomposer.h>
#include <hardware/lights.h> #include <hardware/lights.h>
// linux // linux
#include <linux/input.h> #include <linux/input.h>
@ -164,7 +162,7 @@ HwcomposerBackend::~HwcomposerBackend()
} }
} }
static KWayland::Server::OutputInterface *createOutput(hwc_composer_device_1_t *device) KWayland::Server::OutputInterface* HwcomposerBackend::createOutput(hwc_composer_device_1_t *device)
{ {
uint32_t configs[5]; uint32_t configs[5];
size_t numConfigs = 5; size_t numConfigs = 5;

View file

@ -28,10 +28,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <android-config.h> #include <android-config.h>
// libhybris // libhybris
#include <hardware/hwcomposer.h>
#include <hwcomposer_window.h> #include <hwcomposer_window.h>
// needed as hwcomposer_window.h includes EGL which on non-arm includes Xlib // needed as hwcomposer_window.h includes EGL which on non-arm includes Xlib
#include <fixx11h.h> #include <fixx11h.h>
#include <KWayland/Server/output_interface.h>
typedef struct hwc_display_contents_1 hwc_display_contents_1_t; typedef struct hwc_display_contents_1 hwc_display_contents_1_t;
typedef struct hwc_layer_1 hwc_layer_1_t; typedef struct hwc_layer_1 hwc_layer_1_t;
typedef struct hwc_composer_device_1 hwc_composer_device_1_t; typedef struct hwc_composer_device_1 hwc_composer_device_1_t;
@ -101,6 +104,7 @@ private Q_SLOTS:
private: private:
void initLights(); void initLights();
void toggleScreenBrightness(); void toggleScreenBrightness();
KWayland::Server::OutputInterface* createOutput(hwc_composer_device_1_t *device);
QSize m_displaySize; QSize m_displaySize;
hwc_composer_device_1_t *m_device = nullptr; hwc_composer_device_1_t *m_device = nullptr;
light_device_t *m_lights = nullptr; light_device_t *m_lights = nullptr;