KWin
Loading...
Searching...
No Matches
src
opengl
glrendertimequery.h
Go to the documentation of this file.
1
/*
2
KWin - the KDE window manager
3
This file is part of the KDE project.
4
5
SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@gmail.com>
6
7
SPDX-License-Identifier: GPL-2.0-or-later
8
*/
9
#pragma once
10
11
#include <chrono>
12
#include <epoxy/gl.h>
13
14
#include "kwin_export.h"
15
16
namespace
KWin
17
{
18
19
class
KWIN_EXPORT
GLRenderTimeQuery
20
{
21
public
:
22
explicit
GLRenderTimeQuery
();
23
~GLRenderTimeQuery
();
24
25
void
begin();
26
void
end();
27
31
std::chrono::nanoseconds result();
32
33
private
:
34
GLuint m_query = 0;
35
bool
m_hasResult =
false
;
36
std::chrono::nanoseconds m_cpuStart = std::chrono::nanoseconds::zero();
37
std::chrono::nanoseconds m_cpuEnd = std::chrono::nanoseconds::zero();
38
};
39
40
}
KWin::GLRenderTimeQuery
Definition
glrendertimequery.h:20
KWin
Definition
activation_test.cpp:20
Generated on Sat Feb 17 2024 01:42:09 for KWin by
1.10.0