Displaying 8 results from an estimated 8 matches for "add_variable".
2007 May 23
0
Branch 'as' - 7 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_strings.c
...EC_MOVIE_COLOR (obj)->movie;
+
+ if (movie == NULL)
+ return;
+
+ result = (movie->color_transform.rb << 16) |
+ ((movie->color_transform.gb % 256) << 8) |
+ (movie->color_transform.bb % 256);
+ SWFDEC_AS_VALUE_SET_INT (rval, result);
+}
+
+static inline void
+add_variable (SwfdecAsObject *obj, const char *name, double value)
+{
+ SwfdecAsValue val;
+
+ SWFDEC_AS_VALUE_SET_NUMBER (&val, value);
+ swfdec_as_object_set_variable (obj, name, &val);
+}
+
+static void
+swfdec_movie_color_getTransform (SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecA...
2015 May 24
2
[Mesa-dev] [PATCH 07/11] glsl: Add arb_cull_distance support
On Sun, 2015-05-24 at 19:58 +0200, Tobias Klausmann wrote:
> Signed-off-by: Tobias Klausmann <tobias.johannes.klausmann at mni.thm.de>
> ---
> src/glsl/ast_to_hir.cpp | 14 +++++
> src/glsl/builtin_variables.cpp | 13 +++-
> src/glsl/glcpp/glcpp-parse.y | 3 +
> src/glsl/glsl_parser_extras.cpp | 1 +
> src/glsl/glsl_parser_extras.h
2009 Feb 20
6
How to mock an object defined in the before_filter function?
...general, when there is no expression like "@var =
my_var.function" in the controller and variable @var is defined in
another place and controller just uses it.
my_var.stub!(:function).and_return(@var) doesn''t seem to be working.
Is there is something like
my_var.stub!(:function).add_variable(@var).and_return(:true)
?
Thank you,
Evgeny
=============controller_file
before_filter :find_comment, :only => [:destroy]
def destroy
@destroy_id = @comment.id #to be used in rendering partial
@comment.destroy
respond_to do |format|
format.js
end
end
def find_co...
2015 May 24
19
[RFC PATCH 00/11] Implement ARB_cull_distance
This patch series adds the needed support for this extension to the various
parts of mesa to finally enable it for nvc0.
Dave Airlie (1):
glsl: lower cull_distance into cull_distance_mesa
Tobias Klausmann (10):
glapi: add GL_ARB_cull_distance
mesa/main: add support for GL_ARB_cull_distance
mesa/prog: Add varyings for arb_cull_distance
mesa/st: add support for GL_ARB_cull_distance
2007 Feb 22
0
6 commits - libswfdec/Makefile.am libswfdec/swfdec_js.c libswfdec/swfdec_js_mouse.c libswfdec/swfdec_listener.c libswfdec/swfdec_listener.h libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...(force_continue), NULL);
if (swfdec_player_manager_get_interrupted (manager))
swfdec_player_manager_continue (manager);
g_object_unref (manager);
@@ -297,6 +306,22 @@ do_break_cb (SwfdecDebugger *debugger, S
swfdec_debugger_set_breakpoint (debugger, script, 0);
}
+static gboolean
+add_variables (gpointer player)
+{
+ const char *variables = g_object_get_data (player, "variables");
+ SwfdecLoader *loader = g_object_get_data (player, "loader");
+
+ swfdec_player_set_loader_with_variables (player, loader, variables);
+ if (!swfdec_player_is_initialized (player)) {
+...
2007 Jul 31
0
10 commits - doc/swfdec-docs.sgml doc/swfdec-sections.txt libswfdec-gtk/swfdec_gtk_loader.c libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_buffer.c libswfdec/swfdec_debugger.c libswfdec/swfdec.h
...struct _SwfdecFileLoader
{
SwfdecLoader loader;
-
- char * dir; /* base directory for load operations */
};
struct _SwfdecFileLoaderClass
diff --git a/player/swfdebug.c b/player/swfdebug.c
index 88987a0..5c759db 100644
--- a/player/swfdebug.c
+++ b/player/swfdebug.c
@@ -358,7 +358,8 @@ add_variables (gpointer player)
swfdec_player_set_loader_with_variables (player, loader, variables);
if (!swfdec_player_is_initialized (player)) {
- g_printerr ("File \"%s\" is not a file Swfdec can play\n", loader->url);
+ g_printerr ("File \"%s\" is not a fi...
2007 Aug 29
0
15 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_system_as.c
...-do_break_cb (SwfdecDebugger *debugger, SwfdecDebuggerScript *script, gpointer unused)
-{
- /* no need tobreak on scripts that don't do anything, so no special case needed */
- if (script->n_commands > 0)
- swfdec_debugger_set_breakpoint (debugger, script, 0);
-}
-
-static gboolean
-add_variables (gpointer player)
-{
- const char *variables = g_object_get_data (player, "variables");
- SwfdecLoader *loader = g_object_get_data (player, "loader");
-
- swfdec_player_set_loader_with_variables (player, loader, variables);
- if (!swfdec_player_is_initialized (player)) {
-...
2007 Jun 12
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_math.c libswfdec/swfdec_as_native_function.c libswfdec/swfdec_as_number.c libswfdec/swfdec_as_object.c libswfdec/swfdec_as_string.c
...SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
+swfdec_movie_color_getRGB (SwfdecAsContext *cx, SwfdecAsObject *obj,
+ guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
{
int result;
SwfdecMovie *movie = SWFDEC_MOVIE_COLOR (obj)->movie;
@@ -81,7 +82,8 @@ add_variable (SwfdecAsObject *obj, const
}
static void
-swfdec_movie_color_getTransform (SwfdecAsObject *obj, guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
+swfdec_movie_color_getTransform (SwfdecAsContext *cx, SwfdecAsObject *obj,
+ guint argc, SwfdecAsValue *argv, SwfdecAsValue *rval)
{
Swf...