screencasting: only invert the texture manually when it's not marked as inverted
In the cases where isYInverted(), the texture will be properly placed. It's only when not that we need to mirror it vertically.
This commit is contained in:
parent
1be2b8868c
commit
93815aede4
1 changed files with 2 additions and 1 deletions
|
@ -27,9 +27,10 @@ static void mirrorVertically(uchar *data, int height, int stride)
|
|||
|
||||
static void grabTexture(GLTexture *texture, QImage *image)
|
||||
{
|
||||
const bool invert = !texture->isYInverted();
|
||||
Q_ASSERT(texture->size() == image->size());
|
||||
bool isGLES = GLPlatform::instance()->isGLES();
|
||||
bool invertNeeded = isGLES ^ texture->isYInverted();
|
||||
bool invertNeeded = isGLES ^ invert;
|
||||
const bool invertNeededAndSupported = invertNeeded && GLPlatform::instance()->supports(PackInvert);
|
||||
GLboolean prev;
|
||||
if (invertNeededAndSupported) {
|
||||
|
|
Loading…
Reference in a new issue