[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ./ChangeLog gui/gnash.cpp gui/gtk.cpp gui...
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash ./ChangeLog gui/gnash.cpp gui/gtk.cpp gui... |
Date: |
Wed, 10 May 2006 01:45:50 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Branch:
Changes by: Bastiaan Jacques <address@hidden> 06/05/10 01:45:50
Modified files:
. : ChangeLog
gui : gnash.cpp gtk.cpp gtksup.h gui.cpp
Log message:
* gui/gnash.cpp: Remove unused includes and do small cleanups.
* gui/{gtk.cpp,gtksup.h}: Only compile OpenGL code if we have OpenGL.
* gui/gui.cpp: Remove unused includes.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/ChangeLog.diff?tr1=1.292&tr2=1.293&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/gui/gnash.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/gui/gtk.cpp.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/gui/gtksup.h.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/gnash/gnash/gui/gui.cpp.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gnash/ChangeLog
diff -u gnash/ChangeLog:1.292 gnash/ChangeLog:1.293
--- gnash/ChangeLog:1.292 Wed May 10 01:10:06 2006
+++ gnash/ChangeLog Wed May 10 01:45:50 2006
@@ -1,5 +1,11 @@
2006-05-10 Bastiaan Jacques <address@hidden>
+ * gui/gnash.cpp: Remove unused includes and do small cleanups.
+ * gui/{gtk.cpp,gtksup.h}: Only compile OpenGL code if we have OpenGL.
+ * gui/gui.cpp: Remove unused includes.
+
+2006-05-10 Bastiaan Jacques <address@hidden>
+
* configure.ac: SDL is not a backend, so don't pretend it is one.
* configure.ac, macros/{atk,glib.gtk2,pango}.m4: We still want to know
if these packages are available if gtkglext isn't, so remove the
Index: gnash/gui/gnash.cpp
diff -u gnash/gui/gnash.cpp:1.3 gnash/gui/gnash.cpp:1.4
--- gnash/gui/gnash.cpp:1.3 Tue May 9 00:21:53 2006
+++ gnash/gui/gnash.cpp Wed May 10 01:45:50 2006
@@ -40,13 +40,6 @@
#include "config.h"
#endif
-
-#include <unistd.h>
-#include <cstdlib>
-#include <cstdio>
-#include <vector>
-
-
#if defined(HAVE_GTK2)
# include "gtksup.h"
# define GUI_CLASS GtkGui
@@ -57,15 +50,8 @@
# define GUI_SDL 1
#endif
-
#include "gnash.h"
-#include "log.h"
-#include "utility.h"
-#include "container.h"
-#include "tu_file.h"
-#include "tu_types.h"
#include "movie_definition.h"
-#include <sys/time.h>
using namespace std;
using namespace gnash;
@@ -102,35 +88,27 @@
int
main(int argc, char *argv[])
{
- int c;
- int render_arg;
+ int render_arg; // XXX we probably want to be using this.
char* infile = NULL;
string url;
-
- assert(tu_types_validate());
-
unsigned long windowid = 0;
- float exit_timeout = 0;
- bool do_render = true;
- bool do_sound = false;
- bool sdl_abort = true;
+ bool do_render = true, do_sound = false, sdl_abort = true,
+ background = true, do_loop = true;
unsigned int delay = 0;
- float tex_lod_bias;
- float scale = 1.0f;
- bool background = true;
+ float tex_lod_bias = -1.2f, scale = 1.0f, exit_timeout = 0;
long int width = 0, height = 0;
- bool do_loop = true;
#if defined(RENDERER_CAIRO)
unsigned int bit_depth = 32;
#else
unsigned int bit_depth = 16;
#endif
-
- // -1.0 tends to look good.
- tex_lod_bias = -1.2f;
+
+ assert(tu_types_validate());
+
// scan for the two main long GNU options
+ int c;
for (c=0; c<argc; c++) {
if (strcmp("--help", argv[c]) == 0) {
version_and_copyright();
@@ -278,10 +256,9 @@
}
// Get info about the width & height of the movie.
- int movie_version = 0;
- int movie_width = 0;
- int movie_height = 0;
- float movie_fps = 30.0f;
+ int movie_version = 0, movie_width = 0, movie_height = 0;
+ float movie_fps = 30.0f;
+
gnash::get_movie_info(infile, &movie_version, &movie_width,
&movie_height, &movie_fps, NULL, NULL);
if (movie_version == 0) {
@@ -394,8 +371,10 @@
" -va Be verbose about movie Actions\n"
" -vp Be verbose about parsing the movie\n"
" -m <bias> Specify the texture LOD bias (float, default is -1.0)\n"
-// " -f Run full speed (no sleep) and log frame rate\n"
-// " -e Use SDL Event thread\n"
+#if 0
+ " -f Run full speed (no sleep) and log frame rate\n"
+ " -e Use SDL Event thread\n"
+#endif
" -x <ID> X11 Window ID for display\n"
" -w Produce the disk based debug log\n"
" -1 Play once; exit when/if movie reaches the last frame\n"
@@ -412,10 +391,12 @@
" CTRL-R Restart the movie\n"
" CTRL-[ or kp- Step back one frame\n"
" CTRL-] or kp+ Step forward one frame\n"
-// " CTRL-A Toggle antialiasing (doesn't work)\n"
-// " CTRL-T Debug. Test the set_variable() function\n"
-// " CTRL-G Debug. Test the get_variable() function\n"
-// " CTRL-M Debug. Test the call_method() function\n"
+#if 0
+ " CTRL-A Toggle antialiasing (doesn't work)\n"
+ " CTRL-T Debug. Test the set_variable() function\n"
+ " CTRL-G Debug. Test the get_variable() function\n"
+ " CTRL-M Debug. Test the call_method() function\n"
+#endif
" CTRL-B Toggle background color\n"
);
}
Index: gnash/gui/gtk.cpp
diff -u gnash/gui/gtk.cpp:1.3 gnash/gui/gtk.cpp:1.4
--- gnash/gui/gtk.cpp:1.3 Tue May 9 00:21:53 2006
+++ gnash/gui/gtk.cpp Wed May 10 01:45:50 2006
@@ -175,7 +175,6 @@
#endif
set_render_handler(_renderer);
- log_msg("GL_VERSION: %s", (const char*) glGetString(GL_VERSION));
return true;
}
@@ -592,7 +591,7 @@
return true;
}
-
+#ifdef RENDERER_OPENGL
void
GtkGui::print_gl_config_attrib (GdkGLConfig *glconfig,
const gchar *attrib_str,
@@ -656,7 +655,7 @@
g_print ("\n");
}
-
+#endif // RENDERER_OPENGL
void
@@ -711,7 +710,7 @@
glFlush();
}
gdk_gl_drawable_gl_end (gldrawable);
-#endif
+#endif // RENDERER_OPENGL
}
#if 0
Index: gnash/gui/gtksup.h
diff -u gnash/gui/gtksup.h:1.2 gnash/gui/gtksup.h:1.3
--- gnash/gui/gtksup.h:1.2 Sun May 7 15:33:08 2006
+++ gnash/gui/gtksup.h Wed May 10 01:45:50 2006
@@ -45,7 +45,10 @@
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
+
+#ifdef RENDERER_OPENGL
#include <gtk/gtkgl.h>
+#endif
#include <gtk/gtk.h>
@@ -118,10 +121,12 @@
static gint popup_handler(GtkWidget *widget, GdkEvent *event);
// GtkGLExt utility functions
+#if RENDERER_OPENGL
void print_gl_config_attrib (GdkGLConfig *glconfig,
const gchar *attrib_str,
int attrib, gboolean is_boolean);
void examine_gl_config_attrib (GdkGLConfig *glconfig);
+#endif
private:
GtkWidget *_window;
GtkWidget *_drawing_area;
Index: gnash/gui/gui.cpp
diff -u gnash/gui/gui.cpp:1.2 gnash/gui/gui.cpp:1.3
--- gnash/gui/gui.cpp:1.2 Sun May 7 15:33:08 2006
+++ gnash/gui/gui.cpp Wed May 10 01:45:50 2006
@@ -46,13 +46,6 @@
#include "log.h"
#include "gnash.h"
#include "gui.h"
-#include <GL/gl.h>
-#include <GL/glu.h>
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-#include <gdk/gdkgl.h>
-#include <gtk/gtkgl.h>
-#include "gtksup.h"
namespace gnash {