[Scummvm-cvs-logs] CVS: residual smush.cpp,1.41,1.42 smush.h,1.21,1.22

Pawel Kolodziejski aquadran at users.sourceforge.net
Wed Apr 28 11:33:15 CEST 2004


Update of /cvsroot/scummvm/residual
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12615

Modified Files:
	smush.cpp smush.h 
Log Message:
removed mutex

Index: smush.cpp
===================================================================
RCS file: /cvsroot/scummvm/residual/smush.cpp,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- smush.cpp	28 Apr 2004 18:16:06 -0000	1.41
+++ smush.cpp	28 Apr 2004 18:32:34 -0000	1.42
@@ -41,7 +41,6 @@
 
 Smush::Smush() {
 	g_smush = this;
-	_mutex = create_mutex();
 	_nbframes = 0;
 	_internalBuffer = NULL;
 	_externalBuffer = NULL;
@@ -59,11 +58,9 @@
 
 Smush::~Smush() {
 	deinit();
-	delete_mutex(_mutex);
 }
 
 void Smush::init() {
-	StackLock lock(_mutex);
 	_stream = NULL;
 	_frame = 0;
 	_movieTime = 0;
@@ -71,18 +68,16 @@
 	_videoPause = false;
 	_updateNeeded = false;
 
-	if (!_internalBuffer) {
-		_internalBuffer = (byte *)malloc(_width * _height * 2);
-	}
-	if (!_externalBuffer) {
-		_externalBuffer = (byte *)malloc(_width * _height * 2);
-	}
+	assert(!_internalBuffer);
+	assert(!_externalBuffer);
+
+	_internalBuffer = (byte *)malloc(_width * _height * 2);
+	_externalBuffer = (byte *)malloc(_width * _height * 2);
 
 	g_timer->installTimerProc(&timerCallback, _speed, NULL);
 }
 
 void Smush::deinit() {
-	StackLock lock(_mutex);
     g_timer->removeTimerProc(&timerCallback);
 
 	if (_internalBuffer) {
@@ -136,7 +131,6 @@
 }
 
 void Smush::handleFrame() {
-	StackLock lock(_mutex);
 	uint32 tag;
 	int32 size;
 	int pos = 0;

Index: smush.h
===================================================================
RCS file: /cvsroot/scummvm/residual/smush.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- smush.h	26 Apr 2004 10:03:59 -0000	1.21
+++ smush.h	28 Apr 2004 18:32:50 -0000	1.22
@@ -56,7 +56,6 @@
 	zlibFile _file;
 	PlayingSoundHandle _soundHandle;
 	AppendableAudioStream *_stream;
-	MutexRef _mutex;
 
  	int32 _frame;
 	bool _updateNeeded;





More information about the Scummvm-git-logs mailing list