summaryrefslogtreecommitdiff
path: root/src/gtk/screenshot_cache.cc
AgeCommit message (Collapse)AuthorFilesLines
2010-04-21Rename the log4cxx namespace to logging.Daniel Burrows1-1/+1
There are various problems with log4cxx, especially that it seems to be unreliable and leads to random crashes. It might be a good idea to eventually move to a different framework or roll our own. Decreasing the number of explicit dependencies on log4cxx is a good way to do that.
2009-11-20Be paranoid about the fact that some architectures think file offsets are ↵Daniel Burrows1-7/+10
signed. (Closes: #557212)
2009-11-14Eliminate accesses to freed memory when a callback destroyed the object ↵Daniel Burrows1-0/+28
containing the callback, by taking a strong reference to "this" at stack scope.
2009-11-13More informative logging when a weak screenshot cache entry is revived.Daniel Burrows1-1/+2
2009-11-13Modify all the places where weak pointers are changed to strong pointers to ↵Daniel Burrows1-3/+3
use lock(). lock() is the routine that returns a NULL pointer on failure instead of throwing a fatal exception.
2009-11-12Rename the screenshot cache size configuration option.Daniel Burrows1-1/+1
2009-11-12Log when a screenshot cache entry is destroyed, to help debug whether ↵Daniel Burrows1-0/+3
entries are being leaked.
2009-11-11Subject-verb agreement in a comment.Daniel Burrows1-1/+1
2009-11-11Downgrade a log message for a situation that turns out to be OK from WARN to ↵Daniel Burrows1-4/+4
DEBUG.
2009-11-11Don't zero out the size of screenshots that are evicted from the cache.Daniel Burrows1-3/+0
This may have made sense at one time ... now it doesn't.
2009-11-11When returning entries from the weak cache, don't connect up their signals ↵Daniel Burrows1-0/+5
again. Note: it looks like screenshots are never being deleted. May need to look for reference cycles here.
2009-11-11Log a message when we can't find a weak cache entry.Daniel Burrows1-1/+5
2009-11-11Don't crash when logging a message about dropping a weak entry from the cache.Daniel Burrows1-1/+1
2009-11-11Log useful information about the computed size of a screenshot.Daniel Burrows1-1/+11
2009-11-11Ensure that we catch changes to the amount of cached pixbuf data caused by ↵Daniel Burrows1-0/+4
non-incremental loads. Those loads don't invoke area_prepared() before they invoke ready().
2009-11-11Instead of connecting area_prepared to both a cache entry's area_prepared() ↵Daniel Burrows1-2/+7
method and its signal, have area_prepared() log a useful message and invoke the signal.
2009-11-11When an entry is returned from screenshot_cache::find(), move it to the end ↵Daniel Burrows1-1/+12
of the LRU list.
2009-11-11Fix update_entry_size() to only update the entry's size if it's still in the ↵Daniel Burrows1-11/+11
cache. Entries that were evicted and replaced shouldn't be updated.
2009-11-10Add theoretical support for holding weak pointers to stuff that was evicted ↵Daniel Burrows1-3/+95
from the cache. Not tested because calculation of screenshot sizes seems to be screwy.
2009-11-10Use a key extractor for the package name -> screenshot mapping, so we don't ↵Daniel Burrows1-26/+8
have to use the screenshot as its own identity.
2009-11-05Don't create an initial pixbuf loader; wait till we get a partial download.Daniel Burrows1-1/+1
2009-11-05Slightly more idiomatic test for a missing pixbuf loader.Daniel Burrows1-1/+1
2009-11-05More logging of incremental loads.Daniel Burrows1-0/+3
2009-11-05Better logging around incremental loading of screenshots.Daniel Burrows1-0/+4
2009-11-05Fix the order of arguments to lseek64.Daniel Burrows1-1/+1
2009-11-05Log when we decide not to try incremental loading.Daniel Burrows1-0/+7
2009-11-05Fix the signature of screenshot_cache_entry::partial_download so it actually ↵Daniel Burrows1-4/+5
overrides the base class method.
2009-11-05Add more copious logging of download events on screenshots.Daniel Burrows1-0/+10
2009-11-05Use separate logging categories for the screenshot cache and the image widget.Daniel Burrows1-25/+25
2009-11-05Create a screenshot_key object that encapsulates the information needed to ↵Daniel Burrows1-77/+35
identify a particular screenshot.
2009-11-05Actually add entries into the screenshot cache and return previously ↵Daniel Burrows1-7/+28
existing entries when a new one is looked up.
2009-11-05Log a message when a new image has been loaded for a screenshot.Daniel Burrows1-0/+4
2009-11-05Cleanly handle errors from Gdk::PixbufLoader::close().Daniel Burrows1-3/+43
2009-11-05Don't erase invalid iterators when dropping screenshots from the cache.Daniel Burrows1-1/+1
2009-11-04Don't start the download in the constructor of screenshot cache entries, so ↵Daniel Burrows1-0/+12
that we can get a shared pointer to the entry (which isn't possible until after the constructor runs).
2009-11-04Make sure to always close() the PixbufLoader when we're done with it; GTK+ ↵Daniel Burrows1-0/+15
doesn't like it when we destroy an unclosed loader.
2009-11-04Add definitions of some missing members of screenshot_cache.Daniel Burrows1-0/+3
2009-11-04Move ~cached_screenshot() into the .cc file, since it can't be inlined anyway.Daniel Burrows1-0/+4
2009-11-04Implement gui::get_screenshot().Daniel Burrows1-0/+6
2009-11-04Initial implementation of code to download screenshots from the GUI.Daniel Burrows1-0/+643
This handles a lot of niceties, at least theoretically (still untested): incremental loading, merging requests for the same screenshot (so only one pixbuf is allocated), and caching loaded screenshots.