gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...


From: Sandro Santilli
Subject: [Gnash-commit] gnash ChangeLog server/movie_root.cpp server/mo...
Date: Wed, 23 Apr 2008 10:37:55 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  08/04/23 10:37:55

Modified files:
        .              : ChangeLog 
        server         : movie_root.cpp movie_root.h 

Log message:
        drop unused pixel scale and interfaces to it,
        update documentation for notify_mouse_moved.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6353&r2=1.6354
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.cpp?cvsroot=gnash&r1=1.178&r2=1.179
http://cvs.savannah.gnu.org/viewcvs/gnash/server/movie_root.h?cvsroot=gnash&r1=1.120&r2=1.121

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6353
retrieving revision 1.6354
diff -u -b -r1.6353 -r1.6354
--- ChangeLog   23 Apr 2008 07:24:07 -0000      1.6353
+++ ChangeLog   23 Apr 2008 10:37:54 -0000      1.6354
@@ -1,3 +1,8 @@
+2008-04-23 Sandro Santilli <address@hidden>
+
+       * server/movie_root.{cpp,h}: drop unused pixel scale
+         and interfaces to it, update documentation for notify_mouse_moved.
+
 2008-04-23 Benjamin Wolsey <address@hidden>
 
        * testsuite/swfdec/PASSING: remove the 4 fails from yesterday's

Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.178
retrieving revision 1.179
diff -u -b -r1.178 -r1.179
--- server/movie_root.cpp       22 Apr 2008 12:58:03 -0000      1.178
+++ server/movie_root.cpp       23 Apr 2008 10:37:55 -0000      1.179
@@ -76,7 +76,6 @@
        m_viewport_y0(0),
        m_viewport_width(1),
        m_viewport_height(1),
-       m_pixel_scale(1.0f),
        m_background_color(255, 255, 255, 255),
        m_timer(0.0f),
        m_mouse_x(0),
@@ -160,7 +159,6 @@
                        movie->get_movie_definition()->get_width_pixels());
        m_viewport_height = static_cast<int>(
                        movie->get_movie_definition()->get_height_pixels());
-       m_pixel_scale = 1;
 
        // assert(movie->get_depth() == 0); ?
        movie->set_depth(character::staticDepthOffset);
@@ -453,15 +451,6 @@
 
        if ( _allowRescale ) // Recompute pixel scale.
        {
-               //log_debug("Rescaling allowed");
-
-               // should we cache this ? it's immutable after all !
-               // WARNING: don't allow swapping depth of the root movie !!
-               const rect& frame_size = _rootMovie->get_frame_size();
-
-               float   scale_x = m_viewport_width / 
TWIPS_TO_PIXELS(frame_size.width());
-               float   scale_y = m_viewport_height / 
TWIPS_TO_PIXELS(frame_size.height());
-               m_pixel_scale = fmax(scale_x, scale_y);
 
        }
        else // rescale not allowed, notify Stage (if any)
@@ -1971,10 +1960,12 @@
     os << m_viewport_width << "x" << m_viewport_height;
     localIter = tr.append_child(it, StringPair("Rendered dimensions", 
os.str()));
 
+#if 0
     /// Stage: pixel scale
     os.str("");
     os << m_pixel_scale;
     localIter = tr.append_child(it, StringPair("Pixel scale", os.str()));
+#endif
 
     /// Stage: scaling allowed.
     localIter = tr.append_child(it, StringPair("Scaling allowed",

Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -b -r1.120 -r1.121
--- server/movie_root.h 22 Apr 2008 23:54:59 -0000      1.120
+++ server/movie_root.h 23 Apr 2008 10:37:55 -0000      1.121
@@ -266,12 +266,15 @@
         /// The host app can use this to tell the movie when
         /// user's mouse pointer has moved.
     //
-    /// Coordinates are in pixels.
+    /// Coordinates are in Stage Coordinate Space (pseudo-pixels units).
     ///
     /// This function should return TRUE iff any action triggered
     /// by the event requires redraw, see \ref events_handling for
     /// more info.
     ///
+    /// TODO: take twips (or float pixels), or we won't be able to
+    ///       support sub-pixel accuracy in collision detection.
+    ///
         bool notify_mouse_moved(int x, int y);
 
     /// \brief
@@ -366,15 +369,6 @@
        return getRootMovie()->get_current_frame();
     }
 
-    /// \brief
-    /// Return the size of a logical movie pixel as
-    /// displayed on-screen, with the current device
-    /// coordinates.
-    float   get_pixel_scale() const
-    {
-        return m_pixel_scale;
-    }
-
     void set_background_color(const rgba& color);
 
     void set_background_alpha(float alpha);
@@ -809,8 +803,6 @@
     /// Width and height of viewport, in pixels
     int         m_viewport_width, m_viewport_height;
 
-    float       m_pixel_scale;
-
     rgba        m_background_color;
     float       m_timer;
     int         m_mouse_x, m_mouse_y, m_mouse_buttons;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]