1
0
Fork 0
Commit graph

2 commits

Author SHA1 Message Date
Robert Bragg
6436cd073d Declare interface types as void and remove cast macros
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
2013-11-27 19:33:44 +00:00
Neil Roberts
e98960a685 Conformance test to check whether the pipeline cache holds textures
Currently when a unique pipeline is created and added to the pipeline
cache that pipeline will live forever which includes keeping a
reference to any large resources that the pipeline has such as
textures. These textures don't actually need to be kept for the
pipeline to be used as a key in the hash table so ideally we wouldn't
do this. This test case tries rendering with a pipeline that has
textures and then checks whether the textures are successfully
destroyed after the pipeline is unreffed. The test is currently marked
as a known failure because the pipeline cache will prevent them from
being destroyed.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit 0056f805dadd46b966d57f66b02890b8c29971ac)
2013-04-04 13:37:51 +01:00