mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
White space clean up across a number of files (only removing trailing spaces)
Removed trailing white space from the following files: - clutter-clone-texture.c - clutter-texture.c - clutter-texture.h - cogl/cogl-texture.h - cogl/gl/cogl-context.c - cogl/gl/cogl-texture.c - cogl/gl/cogl-context.h
This commit is contained in:
parent
7649e9de07
commit
cb569a5443
@ -25,7 +25,7 @@
|
||||
|
||||
/**
|
||||
* SECTION:clutter-clone-texture
|
||||
* @short_description: Actor for cloning existing textures in an
|
||||
* @short_description: Actor for cloning existing textures in an
|
||||
* efficient way.
|
||||
*
|
||||
* #ClutterCloneTexture allows the cloning of existing #ClutterTexture based
|
||||
@ -39,7 +39,7 @@
|
||||
#include "clutter-main.h"
|
||||
#include "clutter-feature.h"
|
||||
#include "clutter-actor.h"
|
||||
#include "clutter-util.h"
|
||||
#include "clutter-util.h"
|
||||
#include "clutter-enum-types.h"
|
||||
#include "clutter-private.h"
|
||||
#include "clutter-debug.h"
|
||||
@ -157,16 +157,16 @@ clutter_clone_texture_paint (ClutterActor *self)
|
||||
clutter_actor_get_name (self) ? clutter_actor_get_name (self)
|
||||
: "unknown");
|
||||
|
||||
/* parent texture may have been hidden, there for need to make sure its
|
||||
* realised with resources available.
|
||||
/* parent texture may have been hidden, there for need to make sure its
|
||||
* realised with resources available.
|
||||
*/
|
||||
parent_texture = CLUTTER_ACTOR (priv->parent_texture);
|
||||
if (!CLUTTER_ACTOR_IS_REALIZED (parent_texture))
|
||||
clutter_actor_realize (parent_texture);
|
||||
|
||||
/* If 'parent' texture isn't visible we run its paint to be sure it
|
||||
* updates. Needed for TFP and likely FBOs.
|
||||
* Potentially could cause issues
|
||||
/* If 'parent' texture isn't visible we run its paint to be sure it
|
||||
* updates. Needed for TFP and likely FBOs.
|
||||
* Potentially could cause issues
|
||||
*/
|
||||
if (!clutter_actor_get_paint_visibility(parent_texture))
|
||||
{
|
||||
@ -230,7 +230,7 @@ set_parent_texture (ClutterCloneTexture *ctexture,
|
||||
clutter_actor_hide (actor);
|
||||
}
|
||||
|
||||
if (texture)
|
||||
if (texture)
|
||||
{
|
||||
priv->parent_texture = g_object_ref (texture);
|
||||
|
||||
@ -244,14 +244,14 @@ set_parent_texture (ClutterCloneTexture *ctexture,
|
||||
|
||||
clutter_actor_queue_relayout (actor);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
clutter_clone_texture_dispose (GObject *object)
|
||||
{
|
||||
ClutterCloneTexture *self = CLUTTER_CLONE_TEXTURE(object);
|
||||
ClutterCloneTexturePrivate *priv = self->priv;
|
||||
ClutterCloneTexturePrivate *priv = self->priv;
|
||||
|
||||
if (priv->parent_texture)
|
||||
g_object_unref (priv->parent_texture);
|
||||
@ -261,7 +261,7 @@ clutter_clone_texture_dispose (GObject *object)
|
||||
G_OBJECT_CLASS (clutter_clone_texture_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
clutter_clone_texture_finalize (GObject *object)
|
||||
{
|
||||
G_OBJECT_CLASS (clutter_clone_texture_parent_class)->finalize (object);
|
||||
@ -391,7 +391,7 @@ clutter_clone_texture_init (ClutterCloneTexture *self)
|
||||
* clutter_clone_texture_new:
|
||||
* @texture: a #ClutterTexture, or %NULL
|
||||
*
|
||||
* Creates an efficient 'clone' of a pre-existing texture with which it
|
||||
* Creates an efficient 'clone' of a pre-existing texture with which it
|
||||
* shares the underlying pixbuf data.
|
||||
*
|
||||
* You can use clutter_clone_texture_set_parent_texture() to change the
|
||||
@ -412,7 +412,7 @@ clutter_clone_texture_new (ClutterTexture *texture)
|
||||
/**
|
||||
* clutter_clone_texture_get_parent_texture:
|
||||
* @clone: a #ClutterCloneTexture
|
||||
*
|
||||
*
|
||||
* Retrieves the parent #ClutterTexture used by @clone.
|
||||
*
|
||||
* Return value: a #ClutterTexture actor, or %NULL
|
||||
|
@ -252,8 +252,8 @@ clutter_texture_realize (ClutterActor *actor)
|
||||
if (priv->texture != COGL_INVALID_HANDLE)
|
||||
cogl_texture_unref (priv->texture);
|
||||
|
||||
priv->texture
|
||||
= cogl_texture_new_with_size
|
||||
priv->texture
|
||||
= cogl_texture_new_with_size
|
||||
(priv->width,
|
||||
priv->height,
|
||||
priv->no_slice ? -1 : priv->max_tile_waste,
|
||||
@ -376,12 +376,12 @@ clutter_texture_get_preferred_height (ClutterActor *self,
|
||||
{
|
||||
/* Set the natural height so as to preserve the aspect ratio */
|
||||
ClutterFixed ratio, width;
|
||||
|
||||
|
||||
ratio = COGL_FIXED_DIV (COGL_FIXED_FROM_INT (priv->height),
|
||||
COGL_FIXED_FROM_INT (priv->width));
|
||||
|
||||
width = CLUTTER_UNITS_TO_FIXED (for_width);
|
||||
|
||||
|
||||
*natural_height_p =
|
||||
CLUTTER_UNITS_FROM_FIXED (COGL_FIXED_MUL (ratio, width));
|
||||
}
|
||||
@ -938,7 +938,7 @@ clutter_scriptable_iface_init (ClutterScriptableIface *iface)
|
||||
parent_scriptable_iface = g_type_interface_peek_parent (iface);
|
||||
|
||||
if (!parent_scriptable_iface)
|
||||
parent_scriptable_iface = g_type_default_interface_peek
|
||||
parent_scriptable_iface = g_type_default_interface_peek
|
||||
(CLUTTER_TYPE_SCRIPTABLE);
|
||||
|
||||
iface->set_custom_property = clutter_texture_set_custom_property;
|
||||
@ -1028,7 +1028,7 @@ clutter_texture_load_from_local_data (ClutterTexture *texture)
|
||||
priv->local_data_rowstride,
|
||||
priv->local_data_has_alpha ? 4: 3,
|
||||
0, NULL);
|
||||
|
||||
|
||||
g_free (priv->local_data);
|
||||
priv->local_data = NULL;
|
||||
}
|
||||
@ -1136,7 +1136,7 @@ clutter_texture_set_from_data (ClutterTexture *texture,
|
||||
|
||||
priv = texture->priv;
|
||||
|
||||
if ((new_texture = cogl_texture_new_from_data
|
||||
if ((new_texture = cogl_texture_new_from_data
|
||||
(width, height,
|
||||
priv->no_slice ? -1 : priv->max_tile_waste,
|
||||
priv->filter_quality == CLUTTER_TEXTURE_QUALITY_HIGH,
|
||||
@ -1171,7 +1171,7 @@ clutter_texture_set_from_data (ClutterTexture *texture,
|
||||
* @width: Width in pixels of image data.
|
||||
* @height: Height in pixels of image data
|
||||
* @rowstride: Distance in bytes between row starts.
|
||||
* @bpp: bytes per pixel (Currently only 3 and 4 supported,
|
||||
* @bpp: bytes per pixel (Currently only 3 and 4 supported,
|
||||
* depending on @has_alpha)
|
||||
* @flags: #ClutterTextureFlags
|
||||
* @error: return location for a #GError, or %NULL.
|
||||
@ -1318,7 +1318,7 @@ clutter_texture_set_from_file (ClutterTexture *texture,
|
||||
|
||||
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
|
||||
|
||||
if ((new_texture = cogl_texture_new_from_file
|
||||
if ((new_texture = cogl_texture_new_from_file
|
||||
(filename,
|
||||
priv->no_slice ? -1 : priv->max_tile_waste,
|
||||
priv->filter_quality == CLUTTER_TEXTURE_QUALITY_HIGH,
|
||||
@ -1577,7 +1577,7 @@ clutter_texture_get_base_size (ClutterTexture *texture,
|
||||
* @width: Width in pixels of region to update.
|
||||
* @height: Height in pixels of region to update.
|
||||
* @rowstride: Distance in bytes between row starts on source buffer.
|
||||
* @bpp: bytes per pixel (Currently only 3 and 4 supported,
|
||||
* @bpp: bytes per pixel (Currently only 3 and 4 supported,
|
||||
* depending on @has_alpha)
|
||||
* @flags: #ClutterTextureFlags
|
||||
* @error: return location for a #GError, or %NULL
|
||||
@ -1736,7 +1736,7 @@ on_fbo_parent_change (ClutterActor *actor,
|
||||
*
|
||||
* Note this function is intented as a utility call for uniformly applying
|
||||
* shaders to groups and other potential visual effects. It requires that
|
||||
* the %CLUTTER_FEATURE_OFFSCREEN feature is supported by the current backend
|
||||
* the %CLUTTER_FEATURE_OFFSCREEN feature is supported by the current backend
|
||||
* and the target system.
|
||||
*
|
||||
* Some tips on usage:
|
||||
@ -1829,7 +1829,7 @@ clutter_texture_new_from_actor (ClutterActor *actor)
|
||||
return NULL;
|
||||
|
||||
/* Hopefully now were good.. */
|
||||
texture = g_object_new (CLUTTER_TYPE_TEXTURE,
|
||||
texture = g_object_new (CLUTTER_TYPE_TEXTURE,
|
||||
"disable-slicing", TRUE,
|
||||
NULL);
|
||||
|
||||
|
@ -80,8 +80,8 @@ struct _ClutterTextureClass
|
||||
{
|
||||
ClutterActorClass parent_class;
|
||||
|
||||
void (*size_change) (ClutterTexture *texture,
|
||||
gint width,
|
||||
void (*size_change) (ClutterTexture *texture,
|
||||
gint width,
|
||||
gint height);
|
||||
void (*pixbuf_change) (ClutterTexture *texture);
|
||||
|
||||
|
@ -148,7 +148,7 @@ gboolean cogl_is_texture (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_width:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the width of a cogl texture.
|
||||
*
|
||||
* Returns: the width of the GPU side texture in pixels:
|
||||
@ -158,7 +158,7 @@ guint cogl_texture_get_width (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_height:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the height of a cogl texture.
|
||||
*
|
||||
* Returns: the height of the GPU side texture in pixels:
|
||||
@ -168,7 +168,7 @@ guint cogl_texture_get_height (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_format:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the #CoglPixelFormat of a cogl texture.
|
||||
*
|
||||
* Returns: the #CoglPixelFormat of the GPU side texture.
|
||||
@ -179,7 +179,7 @@ CoglPixelFormat cogl_texture_get_format (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_rowstride:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the rowstride of a cogl texture.
|
||||
*
|
||||
* Returns: the offset in bytes between each consequetive row of pixels.
|
||||
@ -189,7 +189,7 @@ guint cogl_texture_get_rowstride (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_max_waste:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the maximum wasted (unused) pixels in one dimension of a GPU side
|
||||
* texture.
|
||||
*
|
||||
@ -200,7 +200,7 @@ gint cogl_texture_get_max_waste (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_min_filter:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the currently set downscaling filter for a cogl texture.
|
||||
*
|
||||
* Returns: the current downscaling filter for a cogl texture.
|
||||
@ -210,7 +210,7 @@ COGLenum cogl_texture_get_min_filter (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_get_mag_filter:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query the currently set downscaling filter for a cogl texture.
|
||||
*
|
||||
* Returns: the current downscaling filter for a cogl texture.
|
||||
@ -220,7 +220,7 @@ COGLenum cogl_texture_get_mag_filter (CoglHandle handle);
|
||||
/**
|
||||
* cogl_texture_is_sliced:
|
||||
* @handle: a #CoglHandle for a texture.
|
||||
*
|
||||
*
|
||||
* Query if a texture is sliced (stored as multiple GPU side tecture
|
||||
* objects).
|
||||
*
|
||||
@ -235,7 +235,7 @@ gboolean cogl_texture_is_sliced (CoglHandle handle);
|
||||
* @out_gl_handle: pointer to return location for the textures GL handle, or
|
||||
* NULL.
|
||||
* @out_gl_target: pointer to return location for the GL target type, or NULL.
|
||||
*
|
||||
*
|
||||
* Query the GL handles for a GPU side texture through it's #CoglHandle,
|
||||
* if the texture is spliced the data for the first sub texture will be
|
||||
* queried.
|
||||
@ -255,7 +255,7 @@ gboolean cogl_texture_get_gl_texture (CoglHandle handle,
|
||||
* specified.
|
||||
* @data: memory location to write contents of buffer, or %NULL if we're
|
||||
* only querying the data size through the return value.
|
||||
*
|
||||
*
|
||||
* Copy the pixel data from a cogl texture to system memory.
|
||||
*
|
||||
* Returns: the size of the texture data in bytes (or 0 if the texture
|
||||
@ -271,7 +271,7 @@ gint cogl_texture_get_data (CoglHandle handle,
|
||||
* @handle: a #CoglHandle.
|
||||
* @min_filter: the filter used when scaling the texture down.
|
||||
* @mag_filter: the filter used when magnifying the texture.
|
||||
*
|
||||
*
|
||||
* Changes the decimation and interpolation filters used when the texture is
|
||||
* drawn at other scales than 100%.
|
||||
*/
|
||||
@ -297,7 +297,7 @@ void cogl_texture_set_filters (CoglHandle handle,
|
||||
* @data: the actual pixel data.
|
||||
*
|
||||
* Sets the pixels in a rectangular subregion of @handle from an in-memory
|
||||
* buffer containing pixel data.
|
||||
* buffer containing pixel data.
|
||||
*
|
||||
* Returns: %TRUE if the subregion upload was successful, otherwise %FALSE.
|
||||
*/
|
||||
|
@ -41,27 +41,27 @@ cogl_create_context ()
|
||||
{
|
||||
if (_context != NULL)
|
||||
return FALSE;
|
||||
|
||||
|
||||
/* Allocate context memory */
|
||||
_context = (CoglContext*) g_malloc (sizeof (CoglContext));
|
||||
|
||||
|
||||
/* Init default values */
|
||||
_context->feature_flags = 0;
|
||||
_context->features_cached = FALSE;
|
||||
|
||||
|
||||
_context->enable_flags = 0;
|
||||
_context->color_alpha = 255;
|
||||
|
||||
|
||||
_context->path_nodes = g_array_new (FALSE, FALSE, sizeof (CoglPathNode));
|
||||
_context->last_path = 0;
|
||||
|
||||
|
||||
_context->texture_handles = NULL;
|
||||
_context->texture_vertices_size = 0;
|
||||
_context->texture_vertices = NULL;
|
||||
|
||||
|
||||
_context->fbo_handles = NULL;
|
||||
_context->draw_buffer = COGL_WINDOW_BUFFER;
|
||||
|
||||
|
||||
_context->blend_src_factor = CGL_SRC_ALPHA;
|
||||
_context->blend_dst_factor = CGL_ONE_MINUS_SRC_ALPHA;
|
||||
|
||||
@ -70,7 +70,7 @@ cogl_create_context ()
|
||||
_context->program_handles = NULL;
|
||||
|
||||
_context->mesh_handles = NULL;
|
||||
|
||||
|
||||
_context->pf_glGenRenderbuffersEXT = NULL;
|
||||
_context->pf_glBindRenderbufferEXT = NULL;
|
||||
_context->pf_glRenderbufferStorageEXT = NULL;
|
||||
@ -82,7 +82,7 @@ cogl_create_context ()
|
||||
_context->pf_glDeleteFramebuffersEXT = NULL;
|
||||
_context->pf_glBlitFramebufferEXT = NULL;
|
||||
_context->pf_glRenderbufferStorageMultisampleEXT = NULL;
|
||||
|
||||
|
||||
_context->pf_glCreateProgramObjectARB = NULL;
|
||||
_context->pf_glCreateShaderObjectARB = NULL;
|
||||
_context->pf_glShaderSourceARB = NULL;
|
||||
@ -115,7 +115,7 @@ cogl_create_context ()
|
||||
_context->pf_glUniformMatrix4fvARB = NULL;
|
||||
|
||||
_context->pf_glDrawRangeElements = NULL;
|
||||
|
||||
|
||||
/* Init OpenGL state */
|
||||
GE( glTexEnvi (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE) );
|
||||
GE( glColorMask (TRUE, TRUE, TRUE, FALSE) );
|
||||
@ -124,7 +124,7 @@ cogl_create_context ()
|
||||
|
||||
/* Initialise the clip stack */
|
||||
_cogl_clip_stack_state_init ();
|
||||
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -147,7 +147,7 @@ cogl_destroy_context ()
|
||||
g_array_free (_context->shader_handles, TRUE);
|
||||
if (_context->program_handles)
|
||||
g_array_free (_context->program_handles, TRUE);
|
||||
|
||||
|
||||
g_free (_context);
|
||||
}
|
||||
|
||||
@ -157,6 +157,6 @@ _cogl_context_get_default ()
|
||||
/* Create if doesn't exist yet */
|
||||
if (_context == NULL)
|
||||
cogl_create_context ();
|
||||
|
||||
|
||||
return _context;
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ typedef struct
|
||||
/* Features cache */
|
||||
CoglFeatureFlags feature_flags;
|
||||
gboolean features_cached;
|
||||
|
||||
|
||||
/* Enable cache */
|
||||
gulong enable_flags;
|
||||
guint8 color_alpha;
|
||||
@ -49,7 +49,7 @@ typedef struct
|
||||
COGLenum blend_dst_factor;
|
||||
|
||||
gboolean enable_backface_culling;
|
||||
|
||||
|
||||
/* Primitives */
|
||||
CoglFixedVec2 path_start;
|
||||
CoglFixedVec2 path_pen;
|
||||
@ -60,12 +60,12 @@ typedef struct
|
||||
|
||||
/* Cache of inverse projection matrix */
|
||||
GLfloat inverse_projection[16];
|
||||
|
||||
|
||||
/* Textures */
|
||||
GArray *texture_handles;
|
||||
CoglTextureGLVertex *texture_vertices;
|
||||
gulong texture_vertices_size;
|
||||
|
||||
|
||||
/* Framebuffer objects */
|
||||
GArray *fbo_handles;
|
||||
CoglBufferTarget draw_buffer;
|
||||
@ -78,10 +78,10 @@ typedef struct
|
||||
|
||||
/* Clip stack */
|
||||
CoglClipStackState clip;
|
||||
|
||||
|
||||
/* Mesh */
|
||||
GArray *mesh_handles;
|
||||
|
||||
|
||||
/* Relying on glext.h to define these */
|
||||
COGL_PFNGLGENRENDERBUFFERSEXTPROC pf_glGenRenderbuffersEXT;
|
||||
COGL_PFNGLDELETERENDERBUFFERSEXTPROC pf_glDeleteRenderbuffersEXT;
|
||||
@ -95,7 +95,7 @@ typedef struct
|
||||
COGL_PFNGLDELETEFRAMEBUFFERSEXTPROC pf_glDeleteFramebuffersEXT;
|
||||
COGL_PFNGLBLITFRAMEBUFFEREXTPROC pf_glBlitFramebufferEXT;
|
||||
COGL_PFNGLRENDERBUFFERSTORAGEMULTISAMPLEEXTPROC pf_glRenderbufferStorageMultisampleEXT;
|
||||
|
||||
|
||||
COGL_PFNGLCREATEPROGRAMOBJECTARBPROC pf_glCreateProgramObjectARB;
|
||||
COGL_PFNGLCREATESHADEROBJECTARBPROC pf_glCreateShaderObjectARB;
|
||||
COGL_PFNGLSHADERSOURCEARBPROC pf_glShaderSourceARB;
|
||||
@ -151,6 +151,6 @@ _cogl_context_get_default ();
|
||||
CoglContext *ctxvar = _cogl_context_get_default (); \
|
||||
if (ctxvar == NULL) return retval;
|
||||
|
||||
#define NO_RETVAL
|
||||
#define NO_RETVAL
|
||||
|
||||
#endif /* __COGL_CONTEXT_H */
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user