diff options
author | Marco Cecchetti <marco.cecchetti@collabora.com> | 2015-08-29 10:27:21 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-09-01 16:28:48 +0100 |
commit | 31ae4863782b4dfb07573bb96124bb03e44837a7 (patch) | |
tree | 6676625cfeb38ad5bbbb3cd365f6af4a1ba4de07 /vcl/opengl | |
parent | 33f57c485ce21964c9500f3a3d741f655fa5f371 (diff) |
gl-checksum: added a minimum size check for using GL version
(nWidth * nHeight) < (1024*768) || nWidth < 128 || nHeight < 128
Change-Id: Iedda6a333958c76c19b837890eb3fa28e631bc90
Diffstat (limited to 'vcl/opengl')
-rw-r--r-- | vcl/opengl/salbmp.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 2b141ca6a332..d339158d644b 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -594,7 +594,18 @@ void OpenGLSalBitmap::updateChecksum() const pThis->CreateTexture(); } - pThis->mbChecksumValid = calcChecksumGL(pThis->maTexture, pThis->mnChecksum); + OpenGLTexture& rInputTexture = pThis->maTexture; + int nWidth = rInputTexture.GetWidth(); + int nHeight = rInputTexture.GetHeight(); + + if( (nWidth * nHeight) < (1024*768) || nWidth < 128 || nHeight < 128 ) + { + SalBitmap::updateChecksum(); + } + else + { + pThis->mbChecksumValid = calcChecksumGL(rInputTexture, pThis->mnChecksum); + } } OpenGLContext* OpenGLSalBitmap::GetBitmapContext() |