~om26er/ubuntu/oneiric/unity/sru-778256

« back to all changes in this revision

Viewing changes to plugins/unityshell/src/TextureCache.h

  • Committer: Didier Roche
  • Date: 2011-07-21 16:17:59 UTC
  • mfrom: (55.813.3 upstream)
  • Revision ID: didier.roche@canonical.com-20110721161759-osmh94x428t2bf2b
* New upstream release.
* debian/control:
  - build-dep on libnotify-dev
  - bump libnux-1.0-dev dep for ABI break

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
{
35
35
 
36
36
public:
37
 
  // id, width, height, texture 
38
 
  typedef sigc::slot<void, const char *, int, int, nux::BaseTexture **> CreateTextureCallback;
39
 
  
 
37
  // id, width, height, texture
 
38
  typedef sigc::slot<void, const char*, int, int, nux::BaseTexture**> CreateTextureCallback;
 
39
 
40
40
  /* don't new this class, use getdefault */
41
41
 
42
 
  static TextureCache * GetDefault ();
43
 
  nux::BaseTexture * FindTexture (const char *texture_id, int width, int height, CreateTextureCallback callback);
 
42
  static TextureCache* GetDefault();
 
43
  nux::BaseTexture* FindTexture(const char* texture_id, int width, int height, CreateTextureCallback callback);
44
44
 
45
45
protected:
46
 
  TextureCache ();
47
 
  ~TextureCache ();
48
 
  char * Hash (const char *id, int width, int height);
49
 
  std::map<std::string, nux::BaseTexture *> _cache;
50
 
  std::map<nux::BaseTexture *, std::string> _cache_inverse; // just for faster lookups
51
 
  std::map<nux::BaseTexture *, sigc::connection> _cache_con; // track our connections
52
 
  void OnDestroyNotify (nux::Trackable *Object);
 
46
  TextureCache();
 
47
  ~TextureCache();
 
48
  char* Hash(const char* id, int width, int height);
 
49
  std::map<std::string, nux::BaseTexture*> _cache;
 
50
  std::map<nux::BaseTexture*, std::string> _cache_inverse;  // just for faster lookups
 
51
  std::map<nux::BaseTexture*, sigc::connection> _cache_con;  // track our connections
 
52
  void OnDestroyNotify(nux::Trackable* Object);
53
53
};
54
54
 
55
55
#endif // TEXTURECACHE_H