]> git.sesse.net Git - vlc/commitdiff
Merge branch 1.0-bugfix into master
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 23 May 2009 19:39:20 +0000 (22:39 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 23 May 2009 19:39:24 +0000 (22:39 +0300)
modules/gui/skins2/src/anim_bitmap.cpp
modules/gui/skins2/src/anim_bitmap.hpp
modules/video_output/drawable.c

index 1b182b2b82b1edf019a00ee87206de5176dbf6b2..2f66deccdf650320cbe29fd7b63fa4a13b144ae9 100644 (file)
@@ -30,7 +30,7 @@
 
 AnimBitmap::AnimBitmap( intf_thread_t *pIntf, const GenericBitmap &rBitmap ):
     SkinObject( pIntf ), m_pImage( NULL ), m_curFrame( 0 ), m_pTimer( NULL ),
-    m_cmdNextFrame( this )
+    m_cmdNextFrame( this ), m_rBitmap( rBitmap )
 {
     // Build the graphics
     OSFactory *pOsFactory = OSFactory::instance( pIntf );
@@ -73,8 +73,14 @@ void AnimBitmap::draw( OSGraphics &rImage, int xDest, int yDest )
     // Draw the current frame
     int height = m_pImage->getHeight() / m_nbFrames;
     int ySrc = height * m_curFrame;
-    rImage.drawGraphics( *m_pImage, 0, ySrc, xDest, yDest,
-                         m_pImage->getWidth(), height );
+
+    // The old way .... transparency was not taken care of
+    // rImage.drawGraphics( *m_pImage, 0, ySrc, xDest, yDest,
+    //                      m_pImage->getWidth(), height );
+
+    // A new way .... needs to be tested thoroughly
+    rImage.drawBitmap( m_rBitmap, 0, ySrc, xDest, yDest,
+                       m_pImage->getWidth(), height, true );
 }
 
 
index d40bc7349ecd67926fbd1820a3d893a5989bbf6f..58fd30a9845649c4c63c69f29766d56a5af0a887 100644 (file)
@@ -59,6 +59,8 @@ class AnimBitmap: public SkinObject, public Box,
         virtual int getHeight() const;
 
     private:
+        /// Bitmap stored
+        const GenericBitmap &m_rBitmap;
         /// Graphics to store the bitmap
         OSGraphics *m_pImage;
         /// Number of frames
index f97b30dbc2a145bf6a735387bc000ca56558ecf1..ec1c71bb92197247f29b42a1d27f0c5d5c416929 100644 (file)
@@ -92,7 +92,6 @@ static int Open (vlc_object_t *obj, const char *varname, bool ptr)
     else
         val = (void *)(uintptr_t)var_GetInteger (obj, varname);
     var_Destroy (obj, varname);
-    msg_Err (wnd, "%zu, %p", n, val);
 
     /* Keep a list of busy drawables, so we don't overlap videos if there are
      * more than one video track in the stream. */
@@ -123,7 +122,6 @@ skip:
         val = NULL;
     }
     vlc_mutex_unlock (&serializer);
-    msg_Err (wnd, "%zu, %p", n, val);
 
     if (val == NULL)
         return VLC_EGENERIC;