Implement a quota for image data

This commit is contained in:
Kovid Goyal
2017-10-09 11:31:57 +05:30
parent b4b6968e07
commit f396fe59ca
3 changed files with 71 additions and 20 deletions

View File

@@ -50,6 +50,8 @@ typedef struct {
ImageRef *refs;
size_t refcnt, refcap;
double atime;
size_t used_storage;
} Image;
typedef struct {
@@ -71,6 +73,7 @@ typedef struct {
bool layers_dirty;
size_t num_of_negative_refs, num_of_positive_refs;
unsigned int last_scrolled_by;
size_t used_storage;
} GraphicsManager;
PyTypeObject GraphicsManager_Type;