Mon 27 Aug 2007 02:52:04 AM UTC, comment #44:
>Two more test cases, not directly related to this bug item, but
>still about masks: PP is very delicate about masks. You can't use
>text in a mask unless it's part of a movie clip and uses an
>embedded font. Gnash handles any case well (as most probably
>intended by a designer) but the PP is stubborn.
>Do we want to implement this limitation?
We might need to implement this 'limitation' later. Currently, all character instances(including TextField) could act as masks, this is not bad, just not PP compatible:). I think this specific item has been tested enough now, time to close.
To strk: I think this is another case I'd like to know the instance type of a character:) TextField characters act differently as other normal characters as masks.
|
Thu 23 Aug 2007 10:25:39 AM UTC, comment #43:
yeah, masks seems stable now.
Just leave it open for one more day, I'll do some random checks tomorrow. Feeling good about the whole co-operation:)
|
Thu 23 Aug 2007 10:11:09 AM UTC, comment #42:
Works for me. I confirm the blue line. The original pdf2swf output also still works fine. Should we close this bug item ?
|
Thu 23 Aug 2007 09:56:50 AM UTC, comment #41:
Should be fixed for AGG now (please test). There is a minimal anti-aliasing issue visible in mask-simple.swf (slight blue edges at the left and right side of the text field) but it will be hard to avoid that in a multi-pass renderer like Gnash. The PP has no problems with that, probably because it just uses 4-times oversampling (Gnash uses 256, which is much more accurate).
I checked OGL and it did already mask the polygon. That's good for text fields, but bad when masks are not desired (currently only when showing invalidated bounds). I haven't enough (say: "no") knowledge about OpenGL so I can't implement the unmasked version for OGL.
|
Thu 23 Aug 2007 09:12:56 AM UTC, comment #40:
Ok, I will take care of this.
|
Thu 23 Aug 2007 08:06:50 AM UTC, comment #39:
+1 for the extra parameter
|
Thu 23 Aug 2007 05:35:52 AM UTC, comment #38:
OK, I took a look at edit_text_character::display().
The border is drawn by render::draw_poly(), which ignors the masks buffer in AGG renderer. Shouldn't be difficult to fix in this case.
The question is the semantics of render::draw_poly(). Is it supposed to respect the masks buffer? For example, if draw_poly() is used for Flash elements like EditTextFiled borders, then it should consider masks; but if draw_poly() is used for synthetical rectangles(eg. invalidated region for debugging and some other purpose), it is also reasonable not to care about the masks.
What we do? Change the interface to take an extra parameter for masks? Any comments?
|
Thu 23 Aug 2007 03:45:59 AM UTC, comment #37:
>About masktest-simple.swf, gnash only problem is that the
>textfield border is not masked, right ?
yes. Any idea about that?
The border is expected to be masked in both conceptual model and the current implementation. I haven't figured out why it fails. Is the border handled differently with normal shapes?
|
Wed 22 Aug 2007 09:57:04 AM UTC, comment #36:
About masktest-simple.swf, gnash only problem is that the textfield border is not masked, right ?
|
Wed 22 Aug 2007 09:41:55 AM UTC, comment #35:
Well done!!
I created another test case to check if nested movie clips (in a mask) are handled correctly, to see if a deeply nested child is still visible even if one of it's parents (not the direct parent) is invisible. Gnash handles this very well! The test file is masktest-hide-depth.swf
Two more test cases, not directly related to this bug item, but still about masks: PP is very delicate about masks. You can't use text in a mask unless it's part of a movie clip and uses an embedded font. Gnash handles any case well (as most probably intended by a designer) but the PP is stubborn.
Do we want to implement this limitation?
Test files (description included in the movies):
masktest-text.swf
masktest-text-mc.swf
masktest-text-mc-embed.swf
Note: Gnash still fails rendering masked text fields correctly! (masktest-simple.swf)
(file #13762, file #13763, file #13764, file #13765)
|
Wed 22 Aug 2007 05:03:10 AM UTC, comment #34:
UdoG: thanks for the test files.
mask-hide.swf, mask-hide2.swf, mask-hide3.swf passed.
"_visible" is ignored for all masks in cvs-head.
|
Tue 21 Aug 2007 12:16:08 PM UTC, comment #33:
Another testcase (animated mask), handled /nicely/ ba Gnash :)
(file #13756)
|
Tue 21 Aug 2007 12:10:42 PM UTC, comment #32:
Additional note to the prev. comment: Disable invalidated bounds (ENABLE_REGION_UPDATES_DEBUGGING in gui.cpp) to see the real effects. It shows that Gnash effectively disables the mask completely when the movieclip is invisibile.
New testcase: This one uses one movieclip "i1" for the mask. Inside "i1" there is another movieclip (n2, a square) that toggles visibility at 1/2 second intervals. i1 is visible all the time.
_root
|
+-- large rectangular graphic with radial gradient (maskED)
|
+-- "i1" movieclip instance (MASK)
|
+-- circle graphic in i1
|
+-- "n2" movieclip instance <- toggles visibility
|
+-- square graphic in n2
(hope the above diagram is readable)
PP behavior: Masks using both the circle and the square all the time. No animation is visible, ie. doesn't care about _visible.
Gnash behavior: Hides/shows the square part of the mask according to _visible.
As i Flash designer I would say that Gnash is correct, but PP does it's own way... :(
(file #13754)
|
Tue 21 Aug 2007 11:48:26 AM UTC, comment #31:
Looks good! :) But it doesn't handle hidden characters (as part of the mask) correctly.
Attached movie uses a movieclip for mask which is visible for 500ms and then hides (in a loop). There is nothing else in the mask.
PP just doesn't care about the visibility. Gnash toggles between circle and square.
Note that the masked graphic with the red/yellow radial gradient is much bigger (about 3/4 of the stage width).
(file #13753)
|
Tue 21 Aug 2007 11:34:07 AM UTC, comment #30:
Committed a attempt to fix the masks. try cvs-head.
|
Tue 21 Aug 2007 10:12:31 AM UTC, comment #29:
zou: there's no explicit mask (set by AS or SWF tags)
but I'm thinking that a clean implementation would use
masks internally to make sure text glyphs don't get
rendered outside of the TextField bounds.
|
Tue 21 Aug 2007 09:26:57 AM UTC, comment #28:
Attached two more test cases I made for my own a while back.
(file #13750, file #13751)
|
Tue 21 Aug 2007 03:33:48 AM UTC, comment #27:
strk: what do you mean by your attached file? There are no masks in it.
BTW, any other known testcases for masks?
|
Tue 21 Aug 2007 12:06:56 AM UTC, comment #26:
Another testcase for nested mask (I belive we need them) is the attached TextField with a growing bound.
The expected behavour is that only the portion of the text masked by the TextField boundary is shown. This would be easy if we support nested mask...
(file #13746, file #13747)
|
Sun 19 Aug 2007 09:03:27 PM UTC, comment #25:
I run again autogen.sh and it fixed the problem. Now it compiles fine.
Sorry.
|
Sun 19 Aug 2007 08:58:36 PM UTC, comment #24:
Could you file a bug report for the VM.cpp compilation problem ?
Also, could you build from the release_0_8_1 branch ?
|
Sun 19 Aug 2007 11:22:10 AM UTC, comment #23:
Sorry again for the delay. I created the simplest example possible: I used a single-page PDF with just a white background, nothing else. With Gnash it shows a black background; with adobe plugin, the right white background.
I tested this only with last week CVS. I updated today but the compilation breaks in VM.cpp (seems related with patch 6155).
(file #13721)
|
Sun 19 Aug 2007 02:14:55 AM UTC, comment #22:
I'll take care of the masks this week.
|
Sat 18 Aug 2007 05:13:57 PM UTC, comment #21:
Since we're at it, there's some masking to test for setMask too, as that's now needed by one of the movies on youtube.com.
|
Mon 13 Aug 2007 03:24:07 AM UTC, comment #20:
Using pdf2swf to produce testcases for masks, that's crazy:) It is very difficult to control the details by using pdf2swf. And I have no problem to creat one by Ming, I'll do it later.
BTW, I guess Udog also has no difficulty to produce testcases for himself, what he need is just engough time.
|
Mon 13 Aug 2007 02:39:08 AM UTC, comment #19:
zou, it seems pdf2swf is part of SWFTools, so should be easy for us to produce a small testcase, and actually also include it in the testsuite and automate it should be easy.
|
Mon 13 Aug 2007 01:43:46 AM UTC, comment #18:
Sergio,
we were not sure what caused this bug, so we need a smaller testcase.
I think this should be clear now, as it is related to masks. Of course, it is still good if you can provide a smaller testcase:)
|
Mon 13 Aug 2007 01:09:21 AM UTC, comment #17:
<i>Sergio, could you produce the smallest possible SWF with pdf2swf to make comparisons between old and new handling easier ?</i>
Sorry for the delay (summer holidays...). Can you be more explicit? I'm not sure about what do you want me to do :?
|
Fri 10 Aug 2007 02:18:26 PM UTC, comment #16:
Ok. Zou reverted your patch in the 0.8.1 branch.
This means that in 0.8.1 the background color (this bug) is fixed,
while bug #20527 will still be an issue.
In the head branch, nothing was changed, so the background color (this bug) is still an issue, while bug #20527 is fixed.
Feel free to change this, was just an idea for not introducing
regressions.
|
Fri 10 Aug 2007 02:12:04 PM UTC, comment #15:
Ehm, sorry for my ignorance, but which one is the old version now? :)
|
Fri 10 Aug 2007 01:50:28 PM UTC, comment #14:
I'd keep the old version for 0.8.1 to not introduce a regression.
In head we can skip the reversion and let this background thing fail till we fixed it. So I'll reopen this bug item and assign to Udo.
|
Fri 10 Aug 2007 11:38:21 AM UTC, comment #13:
The patch you reverted just makes sure that Gnash remains in a defined state no matter how masks are handled. The old (and now the reverted code) blindly assume that no mask is active while a new mask is "started". The renderers assume that the number of calls to begin_submit_mask() is equal to the number of calls to disable_mask() before rendering of a frame ends (sort of a hierarchy).
AGG will now print again "warning: rendering ended while masks were still active" with such SWF files. Dunno how other renderers deal with this violation.
We still need to find the correct solution but note that my patch wasn't intended to fix the rendering issue, it just had to fix the calls to render_handler::xxxxx_mask().
It was just a side effect that it also fixed rendering for that specific SWF :)
So I suggest that either the patch remains for 0.8.1 or (better) we fix mask handling completely.
I hope I can have a look at it soon, but I'm very busy with lots of other things ATM...
|
Fri 10 Aug 2007 09:49:50 AM UTC, comment #12:
>> Apparently both solutions are wrong!
Agree.
The reverting just fix this specific case. And we still don't have a 100% correct model for the masks. And no matter with a without this patch, bug #20527 will not be fixed(the rendering). So I did this reverting, just for this bug item and the coming release.
It will be great if you fix both bug items:) Or let's consider bug #20527 after the release.
|
Fri 10 Aug 2007 09:34:22 AM UTC, comment #11:
Just to avoid confusion: bug #20527 is not specifically about masks, but along the discussion there are some notes about renderer warnings about masks (and incorrect rendering).
|
Fri 10 Aug 2007 09:30:53 AM UTC, comment #10:
This fixes one bug but breaks bug #20527 again. Apparently both solutions are wrong!
|
Fri 10 Aug 2007 06:01:10 AM UTC, comment #9:
OK, I commited the fix to 0.8.1, please test.
|
Fri 10 Aug 2007 02:24:26 AM UTC, comment #8:
I found reverting the changes in dlist.cpp from 1.74 to 1.73 could fix this bug.
Or modify the source in CVS head directly:
dlist.cpp, line 805,
if (ch->isMask() && !masked) ---> if (ch->isMask())
dlist.cpp, line 816
if (ch->isMask() && !masked) ---> if (ch->isMask())
So, this is bug related to clipDepths or masks.
|
Thu 09 Aug 2007 05:11:22 AM UTC, comment #7:
Sergio, could you produce the smallest possible SWF with pdf2swf to make comparisons between old and new handling easier ?
|
Thu 09 Aug 2007 04:34:51 AM UTC, comment #6:
( ehm... that was 0.8.0 of course )
|
Thu 02 Aug 2007 02:48:56 PM UTC, comment #5:
I tried with gnash-0.8.1 and the background is white, so this is a regression.
|
Thu 02 Aug 2007 02:25:37 PM UTC, comment #4:
You're right, sorry. I tought the SWF itself didn't contain a SETBACKGROUND tag, but bgtest.swf does...
I tried with ogl, btw, and it works fine for me.
Maybe it's some huge black shape, or an open black fill or something else.
|
Thu 02 Aug 2007 08:40:26 AM UTC, comment #3:
Still fails :(
|
Thu 02 Aug 2007 07:10:06 AM UTC, comment #2:
file #13547: bgtest.swf still has a black background for me (current head)
|
Thu 02 Aug 2007 04:57:50 AM UTC, comment #1:
Please try again with current head, should be fixed.
|
Wed 01 Aug 2007 10:24:10 PM UTC, original submission:
Hi all:
I searched the bug list and I think this is still not submited.
I created some slideshows from PDF files using PDF2SWF (the PDFs were created with OpenOffice.org's Impress), and found this bug: if I use a white background (this is, I don't put a background picture, nor a color gradient, just the slide "as is"), GNASH paints the background in black, so black text and other elements are invisible. Adobe's plugin renders them fine, so I think it's not a PDF2SWF bug.
Tested with AGG and Cairo renderers (I can't use OpenGL in my machine).
I attach some example files: the original PDF and the created SWF.
|