From df35576cf92c42398615c8060ffcdcba8671aaf9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 9 Sep 2022 19:00:38 +0200 Subject: [PATCH] fix my previous commit (c0661468) broken. --- common/gal/opengl/opengl_gal.cpp | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/common/gal/opengl/opengl_gal.cpp b/common/gal/opengl/opengl_gal.cpp index aecc3ce2bb..a17fe064ee 100644 --- a/common/gal/opengl/opengl_gal.cpp +++ b/common/gal/opengl/opengl_gal.cpp @@ -108,7 +108,7 @@ private: GLuint cacheBitmap( const BITMAP_BASE* aBitmap ); - std::map< BITMAP_BASE*, CACHED_BITMAP> m_bitmaps; + std::map< const BITMAP_BASE*, CACHED_BITMAP> m_bitmaps; }; }; // namespace KIGFX @@ -121,24 +121,9 @@ GL_BITMAP_CACHE::~GL_BITMAP_CACHE() } -int64_t GL_BITMAP_CACHE::GetKey( const BITMAP_BASE* aBitmap ) -{ - int64_t key = 0; - const unsigned char* data = aBitmap->GetImageData()->GetData(); - - for( int ii = 0; ii < 8; ii++ ) - { - key <<= 8; - key += data[ii]; - } - - return key; -} - - GLuint GL_BITMAP_CACHE::RequestBitmap( const BITMAP_BASE* aBitmap ) { -#ifdef DISABLE_BITMAP_CACHE +#ifndef DISABLE_BITMAP_CACHE auto it = m_bitmaps.find( aBitmap ); if( it != m_bitmaps.end() )