summaryrefslogtreecommitdiff
path: root/src/dispextern.h
diff options
context:
space:
mode:
authorJim Blandy <jimb@redhat.com>1993-05-10 00:15:58 +0000
committerJim Blandy <jimb@redhat.com>1993-05-10 00:15:58 +0000
commit79f9f73c969e8c9d1f5c05c17ebdb316b6e208e7 (patch)
tree6a55b89eec1f3f63871222f47565c2e97064d069 /src/dispextern.h
parent9bea0be7ab9270e79edf1aeac03982f587ffd2d5 (diff)
downloademacs-79f9f73c969e8c9d1f5c05c17ebdb316b6e208e7.tar.gz
* dispextern.h (struct face): Add cached_index member.
* xfaces.c (get_cached_face): Use it to avoid unnecessary searches of face_vector.
Diffstat (limited to 'src/dispextern.h')
-rw-r--r--src/dispextern.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index a89e73120c9..6efe29de8e7 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -29,6 +29,13 @@ struct face
/* If this is non-zero, it is a GC we can use without modification
to represent this face. */
GC gc;
+
+ /* If we have ever called get_cached_face on this face structure,
+ here is the index in face_vector of the face it returned. It
+ might not be valid any more, but it's a good place to start
+ looking; get_cached_face tries to use this to avoid searching
+ all of face_vector. */
+ int cached_index;
/* Pixel value for foreground color. */
int foreground;