summaryrefslogtreecommitdiff
path: root/fitz/res_shade.c
AgeCommit message (Collapse)Author
2012-01-02Bound shades by the supplied bbox.Robin Watts
Fix a 'TODO'. When asking for the bounds of a shading, simply convert the shadings bbox and intersect with that.
2011-12-15Fix warnings/errors on unix builds.Robin Watts
Fix warnings/errors thrown up by the last few commits (which were only tested on windows).
2011-12-15Rework pdf_store to fz_store, a part of fz_context.Robin Watts
Firstly, we rename pdf_store to fz_store, reflecting the fact that there are no pdf specific dependencies on it. Next, we rework it so that all the objects that can be stored in the store start with an fz_storable structure. This consists of a reference count, and a function used to free the object when the reference count reaches zero. All the keep/drop functions are then reimplemented by calling fz_keep_sharable/fz_drop_sharable. The 'drop' functions as supplied by the callers are thus now 'free' functions, only called if the reference count drops to 0. The store changes to keep all the items in the store in the linked list (which becomes a doubly linked one). We still make use of the hashtable to index into this list quickly, but we now have the objects in an LRU ordering within the list. Every object is put into the store, with a size record; this is an estimate of how much memory would be freed by freeing that object. The store is moved into the context and given a maximum size; when new things are inserted into the store, care is taken to ensure that we do not expand beyond this size. We evict any stored items (that are not in use) starting from the least recently used. Finding an object in the store now takes a reference to it already. LOCK and UNLOCK comments are used to indicate where locks need to be taken and released to ensure thread safety.
2011-09-15Add context to mupdf.Robin Watts
Huge pervasive change to lots of files, adding a context for exception handling and allocation. In time we'll move more statics into there. Also fix some for(i = 0; i < function(...); i++) calls.
2011-04-04Le Roi est mort, vive le Roi!Tor Andersson
The run-together words are dead! Long live the underscores! The postscript inspired naming convention of using all run-together words has served us well, but it is now time for more readable code. In this commit I have also added the sed script, rename.sed, that I used to convert the source. Use it on your patches and application code.
2011-03-29Don't shorten colorspace to 'cs' in structs and other names.Tor Andersson
2010-12-29Support linear shadings as a special case in the fitz shading struct and ↵Tor Andersson
renderer.
2010-07-17Remove all trailing whitespace.Tor Andersson
2010-07-01Compute shading bounding box using the triangle mesh.Tor Andersson
2010-06-30Refactor and clean up shading code a bit.Tor Andersson
2010-06-29Reformat to remove all instances of double spaces (to easier spot ↵Tor Andersson
indentation errors in the future).
2010-05-22Rename shade to shading.Sebastian Rasmussen
2010-04-19Improved debug printing of shading to show vertex grouping into triangles.Sebastian Rasmussen
2010-04-17Fix omitted initialization in shade debug printing.Sebastian Rasmussen
2010-04-17Added function to print fitz shading objects for debugging.Sebastian Rasmussen
2010-04-11Rename functions fz_intersectirects and fz_transformaabb.Tor Andersson
2009-12-03Consolidate include lines to a single fitz.h.Tor Andersson
2009-12-02Killing time. Butchered display tree and disabled all calls to it.Tor Andersson
2009-02-28Merge and move header files into the source directories.Tor Andersson
2009-02-28Moved Fitz files into one directory.Tor Andersson
2005-06-04new world orderTor Andersson
2005-03-30rename and shuffle -- part 2Tor Andersson