Ticket #1894: browseicons.2.patch
File browseicons.2.patch, 1.6 KB (added by , 19 years ago) |
---|
-
libs/libmythtv/osdtypes.cpp
1254 1254 { 1255 1255 QString ckey; 1256 1256 1257 if (usecache) 1258 { 1259 if (!filename.isEmpty() && filename.length() >= 2) 1260 ckey = OSDImageCache::CreateKey(filename, wmult, hmult, 1261 scalew, scaleh); 1262 else 1263 return; // this method requires a backing file 1264 } 1257 m_isvalid = false; 1265 1258 1266 1259 // Discard any in-cache items.. 1267 1260 if (m_cacheitem && !usecache) … … 1277 1270 if (m_alpha) 1278 1271 delete [] m_alpha; 1279 1272 m_alpha = NULL; 1280 1281 m_isvalid = false;1282 1273 } 1283 1274 1275 if (filename.isEmpty() || filename.length() < 2) 1276 return; 1277 1284 1278 if (usecache) 1285 1279 { 1280 ckey = OSDImageCache::CreateKey(filename, wmult, hmult, scalew, scaleh); 1281 1286 1282 // Get the item from the cache so it's not freed while in use 1287 1283 OSDImageCacheValue *value = c_cache.Get(ckey, true); 1288 1284 … … 1295 1291 m_alpha = value->m_alpha; 1296 1292 m_imagesize = value->m_imagesize; 1297 1293 m_isvalid = true; 1294 m_filename = filename; 1298 1295 1299 1296 // Put the old image back to the cache so it can be reused in the 1300 1297 // future, and possibly freed by the cache system if the size limit … … 1333 1330 QImage tmp2 = tmpimage.smoothScale(imwidth, imheight); 1334 1331 1335 1332 m_isvalid = true; 1333 m_filename = filename; 1336 1334 1337 1335 m_yuv = new unsigned char[imwidth * imheight * 3 / 2]; 1338 1336 m_ybuffer = m_yuv;