[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/g...
From: |
Bastiaan Jacques |
Subject: |
[Gnash-commit] gnash ChangeLog gui/gnash.cpp gui/gtk.cpp gui/g... |
Date: |
Sat, 15 Jul 2006 16:02:23 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Bastiaan Jacques <bjacques> 06/07/15 16:02:23
Modified files:
. : ChangeLog
gui : gnash.cpp gtk.cpp gtksup.h gui.cpp gui.h
kdesup.h sdl.cpp sdlsup.h
plugin : plugin.cpp
Log message:
* gui/gnash.cpp: Make sure the argument count is greater than two
before treating an argument as a variable.
* gui/gui.{cpp,h}: Remove unused member _xembed.
* gui/{gnash.cpp,kdesup.h,sdl.cpp,sdlsup.h,gtk.cpp,gtksup.h}: Remove
the unused first argument to setCallback().
* plugin/plugin.cpp: Don't do any OpenGL initialization in the plugin,
because the forked gnash does this on its own.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.496&r2=1.497
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gnash.cpp?cvsroot=gnash&r1=1.13&r2=1.14
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtk.cpp?cvsroot=gnash&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gtksup.h?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.cpp?cvsroot=gnash&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/gui.h?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/kdesup.h?cvsroot=gnash&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdl.cpp?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/sdlsup.h?cvsroot=gnash&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/gnash/plugin/plugin.cpp?cvsroot=gnash&r1=1.32&r2=1.33
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.496
retrieving revision 1.497
diff -u -b -r1.496 -r1.497
--- ChangeLog 14 Jul 2006 15:44:14 -0000 1.496
+++ ChangeLog 15 Jul 2006 16:02:23 -0000 1.497
@@ -1,3 +1,13 @@
+2006-07-15 Bastiaan Jacques <address@hidden>
+
+ * gui/gnash.cpp: Make sure the argument count is greater than two
+ before treating an argument as a variable.
+ * gui/gui.{cpp,h}: Remove unused member _xembed.
+ * gui/{gnash.cpp,kdesup.h,sdl.cpp,sdlsup.h,gtk.cpp,gtksup.h}: Remove
+ the unused first argument to setCallback().
+ * plugin/plugin.cpp: Don't do any OpenGL initialization in the plugin,
+ because the forked gnash does this on its own.
+
2006-07-14 Bastiaan Jacques <address@hidden>
* gui/gui.cpp: Don't ignore the arguments passed to the Gui class
Index: gui/gnash.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gnash.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- gui/gnash.cpp 8 Jun 2006 16:11:14 -0000 1.13
+++ gui/gnash.cpp 15 Jul 2006 16:02:23 -0000 1.14
@@ -69,7 +69,6 @@
static void usage ();
static void version_and_copyright();
-static bool advance_movie(void* data);
// we don't need to register a file opener anymore, the
// default gnash::globals::streamProvider is good enough
@@ -243,7 +242,7 @@
// get the file name from the command line
while (optind < argc) {
// Some options set variables, like ip=127.0.0.1
- if (strchr(argv[optind], '=')) {
+ if (argc > 2 && strchr(argv[optind], '=')) {
dbglogfile << "Got variable option on command line!" << endl;
} else {
infile = argv[optind];
@@ -339,7 +338,7 @@
if (!delay) {
delay = (unsigned int) (300 / movie_fps) ; // milliseconds per frame
}
- gui.setCallback(NULL, delay);
+ gui.setCallback(delay);
if (exit_timeout) {
gui.setTimeout((unsigned int)(exit_timeout * 1000));
Index: gui/gtk.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gtk.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- gui/gtk.cpp 11 Jul 2006 14:48:07 -0000 1.12
+++ gui/gtk.cpp 15 Jul 2006 16:02:23 -0000 1.13
@@ -136,7 +136,7 @@
}
void
-GtkGui::setCallback(callback_t func, unsigned int interval)
+GtkGui::setCallback(unsigned int interval)
{
g_timeout_add_full (G_PRIORITY_LOW, interval, (GSourceFunc)advance_movie,
this, NULL);
Index: gui/gtksup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gtksup.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- gui/gtksup.h 11 Jul 2006 14:48:07 -0000 1.10
+++ gui/gtksup.h 15 Jul 2006 16:02:23 -0000 1.11
@@ -75,7 +75,7 @@
virtual bool createMenu();
virtual bool setupEvents();
virtual void renderBuffer();
- virtual void setCallback(callback_t f, unsigned int interval);
+ virtual void setCallback(unsigned int interval);
virtual void setTimeout(unsigned int timeout);
// Menu Item callbacks
Index: gui/gui.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- gui/gui.cpp 14 Jul 2006 15:44:14 -0000 1.9
+++ gui/gui.cpp 15 Jul 2006 16:02:23 -0000 1.10
@@ -61,7 +61,6 @@
_mouse_y(0),
_scale(1.0f),
_mouse_buttons(0),
- _xembed(0),
_depth(16)
#if defined(FIX_I810_LOD_BIAS)
,_tex_lod_bias(-1.2f)
@@ -79,7 +78,6 @@
_mouse_y(0),
_scale(scale),
_mouse_buttons(0),
- _xembed(0),
_depth(depth)
#if defined(FIX_I810_LOD_BIAS)
,_tex_lod_bias(-1.2f)
@@ -90,7 +88,6 @@
bool
Gui::init(int xid, int argc, char **argv[])
{
- _xembed = true;
_xid = xid;
// return init(argc, argv);
return false;
@@ -100,7 +97,6 @@
Gui::createWindow(int xid, int width, int height)
{
// GNASH_REPORT_FUNCTION;
- _xembed = true;
_xid = xid;
// return createWindow(width, height);
return false;
Index: gui/gui.h
===================================================================
RCS file: /sources/gnash/gnash/gui/gui.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- gui/gui.h 13 May 2006 05:45:27 -0000 1.6
+++ gui/gui.h 15 Jul 2006 16:02:23 -0000 1.7
@@ -104,7 +104,6 @@
int _mouse_y;
float _scale;
int _mouse_buttons;
- bool _xembed;
int _depth;
std::string _name;
callback_t _mouse_handler;
Index: gui/kdesup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/kdesup.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- gui/kdesup.h 13 May 2006 05:45:27 -0000 1.2
+++ gui/kdesup.h 15 Jul 2006 16:02:23 -0000 1.3
@@ -83,7 +83,7 @@
virtual bool createMenu();
virtual bool setupEvents();
virtual void renderBuffer();
- virtual void setCallback(callback_t f, unsigned int interval);
+ virtual void setCallback(unsigned int interval);
virtual void setTimeout(unsigned int timeout);
#if defined(RENDERER_OPENGL) && defined(FIX_I810_LOD_BIAS)
virtual void setLodBias(float tex_lod_bias);
Index: gui/sdl.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/sdl.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- gui/sdl.cpp 22 May 2006 18:23:06 -0000 1.8
+++ gui/sdl.cpp 15 Jul 2006 16:02:23 -0000 1.9
@@ -61,7 +61,8 @@
SDLGui::SDLGui(unsigned long xid, float scale, bool loop, unsigned int depth)
: Gui(xid, scale, loop, depth),
_timeout(0),
- _core_trap(true)
+ _core_trap(true),
+ _func(advance_movie)
{
}
@@ -279,10 +280,8 @@
}
void
-SDLGui::setCallback(callback_t func, unsigned int interval)
+SDLGui::setCallback(unsigned int interval)
{
- //_func = func;
- _func = advance_movie;
_interval = interval;
}
Index: gui/sdlsup.h
===================================================================
RCS file: /sources/gnash/gnash/gui/sdlsup.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- gui/sdlsup.h 16 May 2006 12:12:53 -0000 1.6
+++ gui/sdlsup.h 15 Jul 2006 16:02:23 -0000 1.7
@@ -67,7 +67,7 @@
virtual bool createMenu();
virtual bool setupEvents();
virtual void renderBuffer();
- virtual void setCallback(callback_t f, unsigned int interval);
+ virtual void setCallback(unsigned int interval);
virtual void disableCoreTrap();
virtual void setTimeout(unsigned int timeout);
private:
Index: plugin/plugin.cpp
===================================================================
RCS file: /sources/gnash/gnash/plugin/plugin.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- plugin/plugin.cpp 8 Jun 2006 05:40:32 -0000 1.32
+++ plugin/plugin.cpp 15 Jul 2006 16:02:23 -0000 1.33
@@ -49,18 +49,11 @@
// long, including copyright info and URLs and such.
#define PLUGIN_DESCRIPTION SEE-BELOW-SEARCH-FOR-PLUGIN_DESCRIPTION
-#include <GL/glx.h>
-#include <GL/gl.h>
-#include <GL/glu.h>
#ifdef HAVE_GTK2
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#endif
#include <sys/param.h>
-#ifdef USE_GTKGLEXT
-#include <gtk/gtkgl.h>
-#include <gdk/gdkx.h>
-#endif
#include <signal.h>
#include <unistd.h>
#include <stdio.h>
@@ -95,8 +88,6 @@
extern NPNetscapeFuncs NPNFuncs;
NPBool plugInitialized = FALSE;
-Display *gxDisplay = NULL;
-PRLock *glMutex = NULL;
PRLock *playerMutex = NULL;
PRCondVar *playerCond = NULL;
@@ -115,13 +106,6 @@
const int INBUFSIZE = 1024;
-#if 0
-static int attributeList_noFSAA[] = { GLX_RGBA, GLX_DOUBLEBUFFER,
GLX_STENCIL_SIZE, 1, None };
-#else
-static int attributeList_noFSAA[] = { GLX_RGBA, GLX_DOUBLEBUFFER, None };
-#endif
-static int attributeList_FSAA[] = { GLX_RGBA, GLX_DOUBLEBUFFER,
GLX_STENCIL_SIZE, 1, GLX_SAMPLE_BUFFERS_ARB, 1,GLX_SAMPLES_ARB, 1, None };
-
#ifdef HAVE_LIBXML
extern int xml_fd; // FIXME: this is the file descriptor
// from XMLSocket::connect(). This
@@ -170,15 +154,6 @@
PRBool supportsXEmbed = PR_TRUE;
NPNToolkitType toolkit;
- // This mutex is to lock the display before doing any OpenGL or
- // X11 function calls.
- glMutex = PR_NewLock();
- if (glMutex) {
- dbglogfile << "Allocated new GL Mutex" << endl;
- } else {
- dbglogfile << "ERROR: Couldn't allocate new GL Mutex!" << endl;
- }
-
#ifndef USE_FORK
// This mutex is only used with the condition variable.
playerMutex = PR_NewLock();
@@ -198,15 +173,6 @@
}
#endif // end of USE_FORK
- // Open a connection to the X11 server so we can lock the Display
- // when swapping GLX contexts.
- gxDisplay = XOpenDisplay(NULL);
- if (gxDisplay) {
- dbglogfile << "Opened connection to X11 server" << endl;
- } else {
- dbglogfile << "ERROR: Couldn't open a connection to the X11 server!" <<
endl;
- }
-
dbglogfile.setVerbosity(2);
// Make sure that the browser supports functionality we need
@@ -256,12 +222,6 @@
return;
}
- if (glMutex) {
- PR_DestroyLock(glMutex);
- glMutex = NULL;
- dbglogfile << "Destroyed GL Mutex" << endl;
- }
-
#ifndef USE_FORK
if (playerMutex) {
PR_DestroyLock(playerMutex);
@@ -276,12 +236,6 @@
}
#endif // end of USE_FORK
- if (gxDisplay) {
- XCloseDisplay(gxDisplay);
- gxDisplay = NULL;
- dbglogfile << "Closed connection to X11 server" << endl;
- }
-
// GNASH_REPORT_RETURN;
plugInitialized = FALSE;
}
@@ -457,7 +411,6 @@
PR_JoinThread(_thread);
_thread = NULL;
}
- destroyContext();
// end of USE_FORK
#endif
if (_childpid) {
@@ -497,8 +450,6 @@
return TRUE;
}
- lockGL();
- lockX();
mX = aWindow->x;
mY = aWindow->y;
mWidth = aWindow->width;
@@ -518,49 +469,10 @@
mColormap = ws_info->colormap;
// gxDisplay = ws_info->display;
- if (!mFontInfo) {
- if (!(mFontInfo = XLoadQueryFont(gxDisplay, "9x15"))) {
- dbglogfile << "ERROR: Cannot open 9X15 font!" << endl;
- }
- }
-#if 1
- XVisualInfo *vi = glXChooseVisual(gxDisplay, DefaultScreen(gxDisplay),
- attributeList_FSAA);
- if (vi == NULL) {
- vi = glXChooseVisual(gxDisplay, DefaultScreen(gxDisplay),
- attributeList_noFSAA);
- } else {
- vi->visual = mVisual;
- }
-#else
- XWindowAttributes a;
- XVisualInfo vi_in;
- int out_count;
- XGetWindowAttributes(gxDisplay, _window, &a);
- vi_in.visualid = XVisualIDFromVisual(a.visual);
- XVisualInfo *vi = XGetVisualInfo(gxDisplay,
- VisualScreenMask|VisualIDMask,
- &vi_in, &out_count);
-#endif
- _glxContext = glXCreateContext(gxDisplay, vi, 0, GL_TRUE);
- if (_glxContext) {
-// dbglogfile << __FUNCTION__ << ": Got new glxContext "
-// << (void *)_glxContext << endl;
- setGL();
-// initGL();
- _glInitialized = TRUE;
- } else {
- dbglogfile << __FUNCTION__ << ": ERROR: Couldn't get new
glxContext!" << endl;
- }
-
}
resizeWindow(mWidth,mHeight);
- unsetGL();
- freeX();
- freeGL();
-
return NPERR_NO_ERROR;
}
@@ -795,30 +707,6 @@
{
// log_trace("%s: enter for instance %p", __PRETTY_FUNCTION__, this);
- if (!_glInitialized) {
- dbglogfile << __FUNCTION__ << ": OpenGL already killed..." << endl;
- return;
- }
-
- if (gxDisplay && _glxContext) {
- // Grab control of the display
-// lockDisplay();
-// lockGL();
- lockX();
-// setGL();
-
- dbglogfile << __FUNCTION__ << ": Destroying GLX Context "
- << (void *)_glxContext << endl;
- glXDestroyContext(gxDisplay, _glxContext);
- _glxContext = NULL;
-
-// freeDisplay();
- // Release control of the display
-// unsetGL();
- freeX();
-// freeGL();
- }
- _glInitialized = FALSE;
}
/// \brief Resize our viewport after a window resize event
@@ -829,47 +717,6 @@
log_msg("%s: Width = %d, Height = %d", __FUNCTION__, width, height);
- if (!plugInitialized || !_glxContext) {
- dbglogfile << __FUNCTION__ << ": OpenGL not initialized..." << endl;
- return true;
- }
-
- // Grab control of the display
-// lockGL();
-// lockX();
-// setGL();
-
- // Height / width ration
- GLfloat ratio;
-
- // Protect against a divide by zero
- if (height == 0) {
- height = 1;
- }
-
- ratio = (GLfloat)width / (GLfloat)height;
-
- // Setup our viewport.
- glViewport(0, 0, (GLint)width, (GLint)height);
-
- // change to the projection matrix and set our viewing volume.
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
-
- // Set our perspective
- gluPerspective(45.0f, ratio, 0.1f, 100.0f);
-
- // Make sure we're changing the model view and not the projection
- glMatrixMode(GL_MODELVIEW);
-
- // Reset The View
-// glLoadIdentity();
-
- // Release control of the display
-// unsetGL();
-// freeX();
-// freeGL();
-
return(true);
}
- [Gnash-commit] gnash ChangeLog gui/gnash.cpp gui/gtk.cpp gui/g...,
Bastiaan Jacques <=