summaryrefslogtreecommitdiffstats
path: root/mkspecs/devices/linux-mipsel-broadcom-97425-g++/qdirectfbeglhooks_bcm97425.cpp
blob: 564501aa80dc10e018b21cf670895004ddbb62a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include "qdirectfbeglhooks.h"
#include "qdirectfbconvenience.h"

#include "default_directfb.h"

QT_BEGIN_NAMESPACE

// Exported to the directfb plugin
QDirectFBEGLHooks platform_hook;
static void *dbpl_handle;

void QDirectFBEGLHooks::platformInit()
{
    DBPL_RegisterDirectFBDisplayPlatform(&dbpl_handle, QDirectFbConvenience::dfbInterface());
}

void QDirectFBEGLHooks::platformDestroy()
{
    DBPL_UnregisterDirectFBDisplayPlatform(dbpl_handle);
    dbpl_handle = 0;
}

bool QDirectFBEGLHooks::hasCapability(QPlatformIntegration::Capability cap) const
{
    switch (cap) {
    case QPlatformIntegration::ThreadedOpenGL:
        return true;
    default:
        return false;
    }
}

QT_END_NAMESPACE