# HG changeset patch # User Jim Blandy # Date 736992958 0 # Node ID 56a657acd984cd56eb2c968a40a9aa9965969e73 # Parent 4700c2afc248b098541fb2dd9be64e17140f542e * dispextern.h (struct face): Add cached_index member. * xfaces.c (get_cached_face): Use it to avoid unnecessary searches of face_vector. diff -r 4700c2afc248 -r 56a657acd984 src/dispextern.h --- a/src/dispextern.h Mon May 10 00:15:35 1993 +0000 +++ b/src/dispextern.h Mon May 10 00:15:58 1993 +0000 @@ -29,6 +29,13 @@ /* 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;