gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-


From: Bastiaan Jacques
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-151-g3b2e96f
Date: Mon, 28 Feb 2011 20:33:50 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  3b2e96f2791e88bc66c1c7eb55fa34343170be79 (commit)
      from  80dc36abd95f98029825b7995d6a93145b8ca6cb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=3b2e96f2791e88bc66c1c7eb55fa34343170be79


commit 3b2e96f2791e88bc66c1c7eb55fa34343170be79
Author: Bastiaan Jacques <address@hidden>
Date:   Mon Feb 28 21:33:34 2011 +0100

    Use the quality setting when determining what filter to use for drawing 
video frames.

diff --git a/librender/cairo/Renderer_cairo.cpp 
b/librender/cairo/Renderer_cairo.cpp
index 5905dca..f7bc12a 100644
--- a/librender/cairo/Renderer_cairo.cpp
+++ b/librender/cairo/Renderer_cairo.cpp
@@ -486,9 +486,8 @@ 
Renderer_cairo::createCachedBitmap(std::auto_ptr<image::GnashImage> im)
 
 void
 Renderer_cairo::drawVideoFrame(image::GnashImage* baseframe, const Transform& 
xform,
-                               const SWFRect* bounds, bool /*smooth*/)
+                               const SWFRect* bounds, bool smooth)
 {
-
     if (baseframe->type() == image::TYPE_RGBA)
     {
         LOG_ONCE(log_error(_("Can't render videos with alpha")));
@@ -538,6 +537,20 @@ Renderer_cairo::drawVideoFrame(image::GnashImage* 
baseframe, const Transform& xf
     cairo_pattern_set_extend(pattern, CAIRO_EXTEND_NONE);
     cairo_pattern_set_matrix(pattern, &mat);
 
+    cairo_filter_t filter;
+    switch (_quality) {
+        case QUALITY_BEST:
+        case QUALITY_HIGH:
+            if (smooth) {
+                filter = CAIRO_FILTER_GOOD;
+                break;
+            }
+        case QUALITY_MEDIUM:
+        case QUALITY_LOW:
+            filter = CAIRO_FILTER_FAST;
+    }
+    cairo_pattern_set_filter(pattern, filter);
+
     // Draw the frame now
     cairo_save(_cr);
     cairo_set_source(_cr, pattern);
@@ -547,6 +560,7 @@ Renderer_cairo::drawVideoFrame(image::GnashImage* 
baseframe, const Transform& xf
   
     cairo_rectangle(_cr, range.getMinX(), range.getMinY(), range.width(),
                     range.height());
+    
     cairo_clip(_cr);
     cairo_paint(_cr);
     cairo_restore(_cr);

-----------------------------------------------------------------------

Summary of changes:
 librender/cairo/Renderer_cairo.cpp |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

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