Skip to content
This repository has been archived by the owner on Sep 30, 2018. It is now read-only.

Commit

Permalink
drop unused variables from CTextureCache::BackgroundCacheImage
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Marshall committed May 2, 2012
1 parent 9ecf56f commit 8d44b24
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion xbmc/GUILargeTextureManager.cpp
Expand Up @@ -67,7 +67,7 @@ bool CImageLoader::DoWork()
m_texture = CTextureCacheJob::LoadImage(image, width, height, flipped);

if (m_texture)
CTextureCache::Get().BackgroundCacheTexture(texturePath, m_texture, width, height);
CTextureCache::Get().BackgroundCacheTexture(texturePath, m_texture);
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions xbmc/TextureCache.cpp
Expand Up @@ -151,9 +151,9 @@ void CTextureCache::BackgroundCacheImage(const CStdString &url)
AddJob(new CTextureCacheJob(url, cacheHash));
}

void CTextureCache::BackgroundCacheTexture(const CStdString &url, const CBaseTexture *texture, unsigned int max_width, unsigned int max_height)
void CTextureCache::BackgroundCacheTexture(const CStdString &url, const CBaseTexture *texture)
{
AddJob(new CTextureCacheJob(url, texture, max_width, max_height));
AddJob(new CTextureCacheJob(url, texture));
}

CStdString CTextureCache::CacheImageFile(const CStdString &url)
Expand Down
2 changes: 1 addition & 1 deletion xbmc/TextureCache.h
Expand Up @@ -88,7 +88,7 @@ class CTextureCache : public CJobQueue
\sa CheckAndCacheImage
*/
void BackgroundCacheImage(const CStdString &image);
void BackgroundCacheTexture(const CStdString &image, const CBaseTexture *texture, unsigned int max_width, unsigned int max_height);
void BackgroundCacheTexture(const CStdString &image, const CBaseTexture *texture);

/*! \brief Take image URL and add it to image cache
Expand Down
5 changes: 1 addition & 4 deletions xbmc/TextureCacheJob.cpp
Expand Up @@ -40,19 +40,16 @@ CTextureCacheJob::CTextureCacheJob(const CStdString &url, const CStdString &oldH
m_oldHash = oldHash;
m_cachePath = CTextureCache::GetCacheFile(m_url);
m_texture = NULL;
m_maxWidth = m_maxHeight = 0;
m_updateable = false;
}

CTextureCacheJob::CTextureCacheJob(const CStdString &url, const CBaseTexture *texture, unsigned int max_width, unsigned int max_height)
CTextureCacheJob::CTextureCacheJob(const CStdString &url, const CBaseTexture *texture)
{
m_url = url;
if (texture)
m_texture = new CTexture(*(CTexture *)texture);
else
m_texture = NULL;
m_maxWidth = max_width;
m_maxHeight = max_height;
m_cachePath = CTextureCache::GetCacheFile(m_url);
m_updateable = false;
}
Expand Down
4 changes: 1 addition & 3 deletions xbmc/TextureCacheJob.h
Expand Up @@ -36,7 +36,7 @@ class CTextureCacheJob : public CJob
{
public:
CTextureCacheJob(const CStdString &url, const CStdString &oldHash);
CTextureCacheJob(const CStdString &url, const CBaseTexture *texture, unsigned int max_width, unsigned int max_height);
CTextureCacheJob(const CStdString &url, const CBaseTexture *texture);
virtual ~CTextureCacheJob();

virtual const char* GetType() const { return "cacheimage"; };
Expand Down Expand Up @@ -87,8 +87,6 @@ class CTextureCacheJob : public CJob
*/
bool UpdateableURL(const CStdString &url) const;

unsigned int m_maxWidth;
unsigned int m_maxHeight;
CBaseTexture *m_texture;
CStdString m_cachePath;
};
Expand Down

0 comments on commit 8d44b24

Please sign in to comment.