Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Laszlo Agocs
qtrhi
Commits
ae388989
Commit
ae388989
authored
Jan 06, 2019
by
Laszlo Agocs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add QRhiProfilerStreamReader skeleton
parent
2cee799a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
211 additions
and
4 deletions
+211
-4
src/rhi/qrhi.cpp
src/rhi/qrhi.cpp
+7
-0
src/rhi/qrhiprofiler.h
src/rhi/qrhiprofiler.h
+3
-1
src/rhi/qrhiprofilerstreamreader.cpp
src/rhi/qrhiprofilerstreamreader.cpp
+67
-0
src/rhi/qrhiprofilerstreamreader.h
src/rhi/qrhiprofilerstreamreader.h
+64
-0
src/rhi/qrhiprofilerstreamreader_p.h
src/rhi/qrhiprofilerstreamreader_p.h
+59
-0
src/rhi/rhi.pro
src/rhi/rhi.pro
+11
-3
No files found.
src/rhi/qrhi.cpp
View file @
ae388989
...
...
@@ -37,7 +37,9 @@
#include "qrhi_p.h"
#include <qmath.h>
#ifndef QT_NO_OPENGL
#include "qrhigles2_p.h"
#endif
#if QT_CONFIG(vulkan)
#include "qrhivulkan_p.h"
#endif
...
...
@@ -418,8 +420,13 @@ QRhi *QRhi::create(Implementation impl, QRhiInitParams *params, Flags flags)
break
;
#endif
case
OpenGLES2
:
#ifndef QT_NO_OPENGL
r
->
d
=
new
QRhiGles2
(
params
);
break
;
#else
qWarning
(
"This build of Qt has no OpenGL support"
);
break
;
#endif
case
D3D11
:
#ifdef Q_OS_WIN
r
->
d
=
new
QRhiD3D11
(
params
);
...
...
src/rhi/qrhiprofiler.h
View file @
ae388989
...
...
@@ -64,7 +64,6 @@ public:
FrameTime
};
QRhiProfiler
();
~
QRhiProfiler
();
void
setDevice
(
QIODevice
*
device
);
...
...
@@ -74,7 +73,10 @@ public:
void
addVMemAllocatorStats
();
private:
Q_DISABLE_COPY
(
QRhiProfiler
)
QRhiProfiler
();
QRhiProfilerPrivate
*
d
;
friend
class
QRhiImplementation
;
friend
class
QRhiProfilerPrivate
;
};
...
...
src/rhi/qrhiprofilerstreamreader.cpp
0 → 100644
View file @
ae388989
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt RHI module
**
** $QT_BEGIN_LICENSE:LGPL3$
** 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 The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/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 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later 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 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qrhiprofilerstreamreader_p.h"
QT_BEGIN_NAMESPACE
QRhiProfilerStreamReader
::
QRhiProfilerStreamReader
()
:
d
(
new
QRhiProfilerStreamReaderPrivate
)
{
}
QRhiProfilerStreamReader
::
QRhiProfilerStreamReader
(
QIODevice
*
device
)
:
d
(
new
QRhiProfilerStreamReaderPrivate
)
{
d
->
setDevice
(
device
);
}
QRhiProfilerStreamReader
::~
QRhiProfilerStreamReader
()
{
delete
d
;
}
void
QRhiProfilerStreamReader
::
setDevice
(
QIODevice
*
device
)
{
d
->
setDevice
(
device
);
}
void
QRhiProfilerStreamReaderPrivate
::
setDevice
(
QIODevice
*
device
)
{
dev
=
device
;
}
QT_END_NAMESPACE
src/rhi/qrhiprofilerstreamreader.h
0 → 100644
View file @
ae388989
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt RHI module
**
** $QT_BEGIN_LICENSE:LGPL3$
** 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 The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/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 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later 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 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QRHIPROFILERSTREAMREADER_H
#define QRHIPROFILERSTREAMREADER_H
#include <QtRhi/qrhi.h>
QT_BEGIN_NAMESPACE
class
QRhiProfilerStreamReaderPrivate
;
class
QIODevice
;
class
Q_RHI_EXPORT
QRhiProfilerStreamReader
{
public:
QRhiProfilerStreamReader
();
QRhiProfilerStreamReader
(
QIODevice
*
device
);
~
QRhiProfilerStreamReader
();
void
setDevice
(
QIODevice
*
device
);
private:
Q_DISABLE_COPY
(
QRhiProfilerStreamReader
)
QRhiProfilerStreamReaderPrivate
*
d
;
friend
class
QRhiProfilerStreamReaderPrivate
;
};
QT_END_NAMESPACE
#endif
src/rhi/qrhiprofilerstreamreader_p.h
0 → 100644
View file @
ae388989
/****************************************************************************
**
** Copyright (C) 2018 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the Qt RHI module
**
** $QT_BEGIN_LICENSE:GPL$
** 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 The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#ifndef QRHIPROFILERSTREAMREADER_P_H
#define QRHIPROFILERSTREAMREADER_P_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include "qtrhiglobal_p.h"
#include "qrhiprofilerstreamreader.h"
QT_BEGIN_NAMESPACE
class
QRhiProfilerStreamReaderPrivate
{
public:
void
setDevice
(
QIODevice
*
device
);
QIODevice
*
dev
=
nullptr
;
};
QT_END_NAMESPACE
#endif
src/rhi/rhi.pro
View file @
ae388989
...
...
@@ -13,13 +13,21 @@ HEADERS += \
qrhi_p
.
h
\
qrhiprofiler
.
h
\
qrhiprofiler_p
.
h
\
qrhi
gles2
.
h
\
qrhi
gles2
_p
.
h
qrhi
profilerstreamreader
.
h
\
qrhi
profilerstreamreader
_p
.
h
SOURCES
+=
\
qrhi
.
cpp
\
qrhiprofiler
.
cpp
\
qrhigles2
.
cpp
qrhiprofilerstreamreader
.
cpp
qtConfig
(
opengl
)
{
HEADERS
+=
\
qrhigles2
.
h
\
qrhigles2_p
.
h
SOURCES
+=
\
qrhigles2
.
cpp
}
qtConfig
(
vulkan
)
{
HEADERS
+=
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment