00001 /* 00002 * Copyright 2008 Tungsten Graphics, inc. 00003 * All Rights Reserved. 00004 * 00005 * Permission is hereby granted, free of charge, to any person obtaining a 00006 * copy of this software and associated documentation files (the "Software"), 00007 * to deal in the Software without restriction, including without limitation 00008 * on the rights to use, copy, modify, merge, publish, distribute, sub 00009 * license, and/or sell copies of the Software, and to permit persons to whom 00010 * the Software is furnished to do so, subject to the following conditions: 00011 * 00012 * The above copyright notice and this permission notice (including the next 00013 * paragraph) shall be included in all copies or substantial portions of the 00014 * Software. 00015 * 00016 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00017 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00018 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 00019 * TUNGSTEN GRAPHICS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 00020 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 00021 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 00022 * USE OR OTHER DEALINGS IN THE SOFTWARE. 00023 */ 00024 #ifndef _TRANSLATE_CACHE_H 00025 #define _TRANSLATE_CACHE_H 00026 00027 00028 /******************************************************************************* 00029 * Translate cache. 00030 * Simply used to cache created translates. Avoids unecessary creation of 00031 * translate's if one suitable for a given translate_key has already been 00032 * created. 00033 * 00034 * Note: this functionality depends and requires the CSO module. 00035 */ 00036 struct translate_cache; 00037 00038 struct translate_key; 00039 struct translate; 00040 00041 struct translate_cache *translate_cache_create( void ); 00042 void translate_cache_destroy(struct translate_cache *cache); 00043 00051 struct translate *translate_cache_find(struct translate_cache *cache, 00052 struct translate_key *key); 00053 00054 #endif