[kwinglutils] Drop functions related to (nearest) power of two
Summary: Not used anywhere in KWin and annotated that they should be removed. As we have an ABI break in 5.9 we can remove them now. Reviewers: #kwin, #plasma Subscribers: plasma-devel, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3398
This commit is contained in:
parent
56d9f90546
commit
00c9560519
2 changed files with 0 additions and 29 deletions
|
@ -145,24 +145,6 @@ bool checkGLError(const char* txt)
|
|||
return hasError;
|
||||
}
|
||||
|
||||
// TODO: Drop for Plasma 6, no longer needed after OpenGL 2.0
|
||||
int nearestPowerOfTwo(int x)
|
||||
{
|
||||
unsigned y = static_cast<unsigned>(x);
|
||||
|
||||
// From Hank Warren's "Hacker's Delight", clp2() method.
|
||||
// Works for up to 32-bit integers.
|
||||
|
||||
y = y - 1;
|
||||
y = y | (y >> 1);
|
||||
y = y | (y >> 2);
|
||||
y = y | (y >> 4);
|
||||
y = y | (y >> 8);
|
||||
y = y | (y >> 16);
|
||||
|
||||
return static_cast<int>(y + 1);
|
||||
}
|
||||
|
||||
//****************************************
|
||||
// GLShader
|
||||
//****************************************
|
||||
|
|
|
@ -67,17 +67,6 @@ bool KWINGLUTILS_EXPORT hasGLExtension(const QByteArray &extension);
|
|||
// detect OpenGL error (add to various places in code to pinpoint the place)
|
||||
bool KWINGLUTILS_EXPORT checkGLError(const char* txt);
|
||||
|
||||
inline bool KWINGLUTILS_EXPORT isPowerOfTwo(int x)
|
||||
{
|
||||
return ((x & (x - 1)) == 0);
|
||||
}
|
||||
/**
|
||||
* @return power of two integer _greater or equal to_ x.
|
||||
* E.g. nearestPowerOfTwo(513) = nearestPowerOfTwo(800) = 1024
|
||||
**/
|
||||
// TODO: Drop for Plasma 6, no longer needed after OpenGL 2.0
|
||||
int KWINGLUTILS_EXPORT nearestPowerOfTwo(int x);
|
||||
|
||||
QList<QByteArray> KWINGLUTILS_EXPORT openGLExtensions();
|
||||
|
||||
class KWINGLUTILS_EXPORT GLShader
|
||||
|
|
Loading…
Reference in a new issue