mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
461bff1867
The pipeline cache is now handled in CoglPipelineCache instead of directly in the ARBfp fragend. The flags needed to hash a pipeline should be exactly the same for the ARBfp and GLSL fragends so it's convenient to share the code. The hash table now stores the actual pipeline as the value instead of the private data so that the two fragends can attach their data to it. That way it's possible to use the same pipeline key with ancestors that are using different fragends. The hash table is created with g_hash_table_new_full to set a destructor for the key and value and there is a destructor for CoglPipelineCache that gets called when the CoglContext is destroyed. That way we no longer leak the pipelines and shader state when the context is desroyed.
37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
/*
|
|
* Cogl
|
|
*
|
|
* An object oriented GL/GLES Abstraction/Utility Layer
|
|
*
|
|
* Copyright (C) 2010 Intel Corporation.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library. If not, see
|
|
* <http://www.gnu.org/licenses/>.
|
|
*
|
|
*
|
|
*
|
|
* Authors:
|
|
* Robert Bragg <robert@linux.intel.com>
|
|
*/
|
|
|
|
#ifndef __COGL_PIPELINE_FRAGEND_ARBFP_PRIVATE_H
|
|
#define __COGL_PIPELINE_FRAGEND_ARBFP_PRIVATE_H
|
|
|
|
#include "cogl-pipeline-private.h"
|
|
|
|
extern const CoglPipelineFragend _cogl_pipeline_arbfp_fragend;
|
|
|
|
#endif /* __COGL_PIPELINE_ARBFP_PRIVATE_H */
|
|
|