gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash ChangeLog gui/fb.cpp


From: Udo Giacomozzi
Subject: [Gnash-commit] gnash ChangeLog gui/fb.cpp
Date: Sat, 10 Feb 2007 17:00:03 +0000

CVSROOT:        /cvsroot/gnash
Module name:    gnash
Changes by:     Udo Giacomozzi <udog>   07/02/10 17:00:03

Modified files:
        .              : ChangeLog 
        gui            : fb.cpp 

Log message:
        gui/fb.cpp: fixed some compilation problems when DOUBLE_BUFFER is 
disabled; fixed _validbounds so that the movie is visible again; added 2 pixel 
border to invalidated bounds to fix anti-aliasing problems; set scaling to view 
movie full-screen

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2299&r2=1.2300
http://cvs.savannah.gnu.org/viewcvs/gnash/gui/fb.cpp?cvsroot=gnash&r1=1.21&r2=1.22

Patches:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/gnash/gnash/ChangeLog,v
retrieving revision 1.2299
retrieving revision 1.2300
diff -u -b -r1.2299 -r1.2300
--- ChangeLog   10 Feb 2007 13:39:32 -0000      1.2299
+++ ChangeLog   10 Feb 2007 17:00:02 -0000      1.2300
@@ -1,3 +1,10 @@
+2007-02-10 Udo Giacomozzi <address@hidden>
+
+  * gui/fb.cpp: fixed some compilation problems when DOUBLE_BUFFER is 
+    disabled; fixed _validbounds so that the movie is visible again; 
+    added 2 pixel border to invalidated bounds to fix anti-aliasing
+    problems; set scaling to view movie full-screen         
+
 2007-02-10 Sandro Santilli <address@hidden>
 
        * server/sprite_instance.cpp: remove characters

Index: gui/fb.cpp
===================================================================
RCS file: /cvsroot/gnash/gnash/gui/fb.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- gui/fb.cpp  31 Jan 2007 15:24:13 -0000      1.21
+++ gui/fb.cpp  10 Feb 2007 17:00:02 -0000      1.22
@@ -106,7 +106,9 @@
 {
        fd                      = -1;
        fbmem   = NULL;
+       #ifdef DOUBLE_BUFFER
        buffer  = NULL;
+       #endif
        
        signal(SIGINT, terminate_signal);
        signal(SIGTERM, terminate_signal);
@@ -121,10 +123,12 @@
                close(fd);
        }
 
+  #ifdef DOUBLE_BUFFER
        if (buffer) {
                log_msg("Free'ing offscreen buffer\n");
                free(buffer);
        }
+       #endif
 }
 
 
@@ -217,10 +221,14 @@
   m_stage_width = _width;
   m_stage_height = _height;
   
+  _validbounds.setTo(0, 0, _width, _height);
+    
   
   #ifdef DOUBLE_BUFFER
+  log_msg("Double buffering enabled");
   _mem = buffer;
   #else
+  log_msg("Double buffering disabled");
   _mem = fbmem;
   #endif
   
@@ -236,6 +244,18 @@
   log_msg("blue channel: %d / %d", var_screeninfo.blue.offset, 
     var_screeninfo.blue.length);
   
+  
+  /*
+  // please keep this for a while; I have to fix a strange bug in mode 
+  // detection... (Udo)   
+  log_msg("(var_screeninfo.red.offset==16) : %d",   
(var_screeninfo.red.offset==16) );
+  log_msg("(var_screeninfo.red.length==8)  : %d",   
(var_screeninfo.red.length==8) );  
+  log_msg("(var_screeninfo.green.offset==8): %d",   
(var_screeninfo.green.offset==8) );
+  log_msg("(var_screeninfo.green.length==8): %d",   
(var_screeninfo.green.length==8) );
+  log_msg("(var_screeninfo.blue.offset==0) : %d",   
(var_screeninfo.blue.offset==0) ); 
+  log_msg("(var_screeninfo.blue.length==8) : %d",   
(var_screeninfo.blue.length==8) );
+  */ 
+  
   // 15 bits RGB (hicolor)
   if ((var_screeninfo.red.offset==10)
    && (var_screeninfo.red.length==5)
@@ -258,6 +278,7 @@
     agg_handler = create_render_handler_agg("RGB565");
       
   } else   
+  
   // 24 bits RGB (truecolor)
   if ((var_screeninfo.red.offset==16)
    && (var_screeninfo.red.length==8)
@@ -300,6 +321,9 @@
 {
   double timer = 0.0;
 
+  // let the GUI recompute the x/y scale factors to best fit the whole screen
+  resize_view(_validbounds.width(), _validbounds.height());
+
        while (!terminate_request) {
        
          double prevtimer = timer; 
@@ -320,7 +344,6 @@
 
 void FBGui::renderBuffer()
 {
-
        if ( _drawbounds.isNull() ) return; // nothing to do..
 
        assert ( ! _drawbounds.isWorld() );
@@ -403,20 +426,21 @@
 
 void FBGui::setInvalidatedRegion(const rect& bounds) {
 
+
+  bounds.print();
+
 #ifdef DOUBLE_BUFFER
   
        // forward to renderer
        _renderer->set_invalidated_region(bounds);
 
        // update _drawbounds, which are the bounds that need to
-       // be rerendered (??)
+       // be rerendered
        //
        _drawbounds = Intersection(
-                       _renderer->world_to_pixel(bounds),
+    _renderer->world_to_pixel(bounds).growBy(2), // add two pixels because of 
anti-aliasing...
                        _validbounds);
   
-       // TODO: add two pixels because of anti-aliasing...
-
 #endif
   
 }  // setInvalidatedRegion




reply via email to

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