mirror of
https://github.com/brl/mutter.git
synced 2024-11-28 19:10:43 -05:00
6436cd073d
This declares the interface types CoglFramebuffer, CoglBuffer, CoglTexture, CoglMetaTexture and CoglPrimitiveTexture as void when including the public cogl.h header so that users don't have to use lots of C type casts between instance types and interface types. This also removes all of the COGL_XYZ() type cast macros since they do nothing more than compile time type casting but it's less readable if you haven't seen that coding pattern before. Unlike with gobject based apis that use per-type macros for casting and performing runtime type checking we instead prefer to do our runtime type checking internally within the front-end public apis when objects are passed into Cogl. This greatly reduces the verbosity for users of the api and may help reduce the chance of excessive runtime type checking that can sometimes be a problem. (cherry picked from commit 248a76f5eac7e5ae4fb45208577f9a55360812a7) Since we can't break the 1.x api this version of the patch actually defines compatible NOP macros within deprecated/cogl-type-casts.h
67 lines
1.8 KiB
C
67 lines
1.8 KiB
C
/*
|
|
* Cogl
|
|
*
|
|
* An object oriented GL/GLES Abstraction/Utility Layer
|
|
*
|
|
* Copyright (C) 2011 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:
|
|
* Neil Roberts <neil@linux.intel.com>
|
|
*/
|
|
|
|
#ifndef __COGL_PANGO_PIPELINE_CACHE_H__
|
|
#define __COGL_PANGO_PIPELINE_CACHE_H__
|
|
|
|
#include <glib.h>
|
|
|
|
#include "cogl/cogl-context-private.h"
|
|
|
|
COGL_BEGIN_DECLS
|
|
|
|
typedef struct _CoglPangoPipelineCache
|
|
{
|
|
CoglContext *ctx;
|
|
|
|
GHashTable *hash_table;
|
|
|
|
CoglPipeline *base_texture_alpha_pipeline;
|
|
CoglPipeline *base_texture_rgba_pipeline;
|
|
|
|
CoglBool use_mipmapping;
|
|
} CoglPangoPipelineCache;
|
|
|
|
|
|
CoglPangoPipelineCache *
|
|
_cogl_pango_pipeline_cache_new (CoglContext *ctx,
|
|
CoglBool use_mipmapping);
|
|
|
|
/* Returns a pipeline that can be used to render glyphs in the given
|
|
texture. The pipeline has a new reference so it is up to the caller
|
|
to unref it */
|
|
CoglPipeline *
|
|
_cogl_pango_pipeline_cache_get (CoglPangoPipelineCache *cache,
|
|
CoglTexture *texture);
|
|
|
|
void
|
|
_cogl_pango_pipeline_cache_free (CoglPangoPipelineCache *cache);
|
|
|
|
COGL_END_DECLS
|
|
|
|
#endif /* __COGL_PANGO_PIPELINE_CACHE_H__ */
|