projects
/
mikachu
/
openbox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add a bunch of comments for images and image caches. and make the number of resized...
[mikachu/openbox.git]
/
render
/
render.h
diff --git
a/render/render.h
b/render/render.h
index
e79727d
..
7053664
100644
(file)
--- a/
render/render.h
+++ b/
render/render.h
@@
-234,11
+234,18
@@
struct _RrImagePic {
pictures */
struct _RrImage {
gint ref;
pictures */
struct _RrImage {
gint ref;
-
struct _
RrImageCache *cache;
+ RrImageCache *cache;
- struct _RrImagePic **original;
+ /*! An array of "originals", that is of RrPictures that have been added
+ to the image in various sizes, and that have not been resized. These
+ are explicitly added to the RrImage. */
+ RrImagePic **original;
gint n_original;
gint n_original;
- struct _RrImagePic **resized;
+ /*! An array of "resized" pictures. When an "original" RrPicture
+ needs to be resized for drawing, it is saved in here so that it doesn't
+ need to be resized again. These are automatically added to the
+ RrImage. */
+ RrImagePic **resized;
gint n_resized;
};
gint n_resized;
};
@@
-317,7
+324,10
@@
gboolean RrPixmapToRGBA(const RrInstance *inst,
Pixmap pmap, Pixmap mask,
gint *w, gint *h, RrPixel32 **data);
Pixmap pmap, Pixmap mask,
gint *w, gint *h, RrPixel32 **data);
-RrImageCache* RrImageCacheNew();
+/*! Create a new image cache for RrImages.
+ @param max_resized_saved The number of resized copies of an image to save
+*/
+RrImageCache* RrImageCacheNew(gint max_resized_saved);
void RrImageCacheRef(RrImageCache *self);
void RrImageCacheUnref(RrImageCache *self);
void RrImageCacheRef(RrImageCache *self);
void RrImageCacheUnref(RrImageCache *self);