render: Report pixmap usage of pictures to resource extension.

Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This commit is contained in:
Rami Ylimäki
2010-10-27 16:59:06 +03:00
committed by Erkki Seppälä
parent 96864bfa95
commit e83388cc70
4 changed files with 271 additions and 0 deletions

View File

@@ -152,12 +152,37 @@ typedef Bool (*FindComplexResType) (pointer /*value */ ,
XID /*id */ ,
pointer /*cdata */ );
/* Structure for estimating resource memory usage. Memory usage
* consists of space allocated for the resource itself and of
* references to other resources. Currently the most important use for
* this structure is to estimate pixmap usage of different resources
* more accurately. */
typedef struct {
/* Size of resource itself. Zero if not implemented. */
unsigned long resourceSize;
/* Size attributed to pixmap references from the resource. */
unsigned long pixmapRefSize;
} ResourceSizeRec, *ResourceSizePtr;
typedef void (*SizeType)(pointer /*value*/,
XID /*id*/,
ResourceSizePtr /*size*/);
extern _X_EXPORT RESTYPE CreateNewResourceType(DeleteType /*deleteFunc */ ,
const char * /*name */ );
extern _X_EXPORT void SetResourceTypeErrorValue(RESTYPE /*type */ ,
int /*errorValue */ );
extern _X_EXPORT SizeType GetResourceTypeSizeFunc(
RESTYPE /*type*/);
extern _X_EXPORT void SetResourceTypeSizeFunc(
RESTYPE /*type*/, SizeType /*sizeFunc*/);
extern _X_EXPORT void SetResourceTypeErrorValue(
RESTYPE /*type*/, int /*errorValue*/);
extern _X_EXPORT RESTYPE CreateNewResourceClass(void);
extern _X_EXPORT Bool InitClientResources(ClientPtr /*client */ );