(cls, name, location)
| 62 | |
| 63 | @classmethod |
| 64 | def getBitmap(cls, name, location): |
| 65 | if cls.dont_use_cached_bitmaps: |
| 66 | return cls.loadBitmap(name, location) |
| 67 | |
| 68 | path = "%s%s" % (name, location) |
| 69 | |
| 70 | if len(cls.cached_bitmaps) == cls.max_cached_bitmaps: |
| 71 | cls.cached_bitmaps.popitem(False) |
| 72 | |
| 73 | if path not in cls.cached_bitmaps: |
| 74 | bmp = cls.loadBitmap(name, location) |
| 75 | cls.cached_bitmaps[path] = bmp |
| 76 | else: |
| 77 | bmp = cls.cached_bitmaps[path] |
| 78 | |
| 79 | return bmp |
| 80 | |
| 81 | @classmethod |
| 82 | def getImage(cls, name, location): |
no test coverage detected