[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r10715: Base bitmap smoothing heuris
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r10715: Base bitmap smoothing heuristic on the new bitmap fill smoothing policy. |
Date: |
Wed, 18 Mar 2009 16:29:29 +0100 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10715
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Wed 2009-03-18 16:29:29 +0100
message:
Base bitmap smoothing heuristic on the new bitmap fill smoothing policy.
Fixes bug #25894.
modified:
backend/render_handler_agg.cpp
=== modified file 'backend/render_handler_agg.cpp'
--- a/backend/render_handler_agg.cpp 2009-03-17 10:19:12 +0000
+++ b/backend/render_handler_agg.cpp 2009-03-18 15:29:29 +0000
@@ -1244,7 +1244,6 @@
const size_t fcount = fill_styles.size();
for (size_t fno=0; fno<fcount; ++fno) {
- bool smooth = false;
int fill_type = fill_styles[fno].get_type();
switch (fill_type) {
@@ -1290,8 +1289,6 @@
case SWF::FILL_TILED_BITMAP:
case SWF::FILL_CLIPPED_BITMAP:
- smooth= true; // continue with next case!
-
case SWF::FILL_TILED_BITMAP_HARD:
case SWF::FILL_CLIPPED_BITMAP_HARD:
{
@@ -1302,29 +1299,39 @@
m.concatenate(cm);
m.concatenate(inv_stage_matrix);
+ //
+ // Smoothing policy:
+ //
+ // - If unspecified, smooth when _quality >= BEST
+ // - If ON or forced, smooth when _quality > LOW
+ // - If OFF, don't smooth
+ //
+ // TODO: take a forceBitmapSmoothing parameter.
+ // which should be computed by the VM looking
+ // at MovieClip.forceSmoothing.
+ //
+ bool smooth = false;
+ if ( _quality > QUALITY_LOW ) // never smooth in LOW quality
+ {
+ // TODO: if forceSmoothing is true, smooth !
+ switch ( fill_styles[fno].getBitmapSmoothingPolicy() )
+ {
+ case fill_style::BITMAP_SMOOTHING_UNSPECIFIED:
+ if ( _quality >= QUALITY_BEST ) smooth = true;
+ break;
+ case fill_style::BITMAP_SMOOTHING_ON:
+ smooth = true;
+ break;
+ default: break;
+ }
+ }
+
sh.add_bitmap(dynamic_cast<agg_bitmap_info*>
(fill_styles[fno].get_bitmap_info()), m, cx,
(fill_type==SWF::FILL_TILED_BITMAP) ||
(fill_type==SWF::FILL_TILED_BITMAP_HARD),
+ smooth);
- smooth &&
- // TODO:
- //
- // Non-HARD bitmap fills are smoothed or
- // not depending on _quality and SWF version:
- // - For SWF8 and up (where _HARD versions are available)
- // they are smoothed starting at quality MEDIUM.
- // - For previous SWF versions they are only smoothed
- // with quality BEST
- //
- // NOTE: the SWF version to take into account here is
- // the one of the file containing the definition
- // of the fills, not the top-level file loaded.
- //
- // It needs to be checked behaviour for bitmap
- // fills produced with ActionScript
- //
- _quality >= QUALITY_HIGH);
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r10715: Base bitmap smoothing heuristic on the new bitmap fill smoothing policy.,
Sandro Santilli <=