(d3d9-layers) Painting problem of Flash Video Controls when layers.accelerate-all;true

RESOLVED FIXED

Status

()

Core
Graphics
RESOLVED FIXED
7 years ago
2 years ago

People

(Reporter: Alice0775 White, Assigned: roc)

Tracking

(Blocks: 1 bug)

Trunk
x86
Windows 7
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking2.0 betaN+)

Details

(URL)

Attachments

(5 attachments, 2 obsolete attachments)

(Reporter)

Description

7 years ago
Created attachment 472425 [details]
screenshot

Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6pre) Gecko/20100906 Firefox/4.0b6pre ID:20100906041818
Under condition of D2D enabled,

Painting problem of Flash Video Controls after loading of the page or reloading.
It does not happens if layers.accelerate-all = false.

Reproducible: Always

Steps to Reproduce:
1. Start Minefield with new profile
2. Open URL ( http://www.youtube.com/watch?v=K7l0a2PVhPQ&feature=player_embedded )


Actual Results:
 Painting problem of Flash Video Controls.
 It is displayed normally in a few minutes.
 However, It happens again when reload the page.

Expected Results:
 Flash Video Controls is painted properly.

Graphics
      
        
Adapter Description: ATI Radeon HD 4300/4500 Series
Vendor ID: 1002
Device ID: 954f
Adapter RAM: 512
Adapter Drivers: aticfx64 aticfx64 aticfx32 aticfx32 atiumd64 atidxx64 atiumdag atidxx32 atiumdva atiumd6a atitmm64
Driver Version: 8.762.0.0
Driver Date: 8-3-2010
Direct2D Enabled: true
DirectWrite Enabled: true
GPU Accelerated Layers Enabled: 1/1


Regression window:
Works:
http://hg.mozilla.org/mozilla-central/rev/b57dda2ee56d
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6pre) Gecko/20100904 Firefox/4.0b6pre ID:20100904212104
Fails:
http://hg.mozilla.org/mozilla-central/rev/fd13b6ce36bd
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6pre) Gecko/20100904 Firefox/4.0b6pre ID:20100904234810
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=b57dda2ee56d&tochange=fd13b6ce36bd
blocking2.0: --- → ?
confirming this also on Windows XP
maybe this is dupe of #587508 (or related) ?
(In reply to comment #1)
> maybe this is dupe of #587508 (or related) ?
No, this is Layers related, the other is a D2D Issue. Hence the different Summary.
Don't mix them both up ;-)

Updated

7 years ago
Duplicate of this bug: 594410
FWIW, Bug 596152 did not fix this one. Probably cause it's Plugin related.
Created attachment 477429 [details]
Plugin content is messed up after scrolling

I found a layers problem when scrolling, too.

1. Open http://www.flash-game.net/game/4826/extreme-safari.html
2. scroll
3. The plugin will be messed up (see screenshot)

I dunno it's another bug or not.

It's not the D2D, i turned off D2D this time. Fresh profile. Latest hourly build
http://hg.mozilla.org/mozilla-central/rev/607938e4b608

Updated

7 years ago
Duplicate of this bug: 598664

Comment 7

7 years ago
Created attachment 477573 [details]
Flash Video problem
(Reporter)

Comment 8

7 years ago
I think that Comment #5 and Comment #7 are other bug, Because because, as for this bug, the scroll does not matter.

As described by comment #0,the problem occurs just to load or reload page.
This is almost certainly a dup of bug 587508. Let's see if the workaround patch there fixes this.
Depends on: 587508
(Reporter)

Comment 10

7 years ago
(In reply to comment #9)
> This is almost certainly a dup of bug 587508. Let's see if the workaround patch
> there fixes this.


Not yet fixed after landing Bug 587508. I can reproduce the problem of comment #0.
http://hg.mozilla.org/mozilla-central/rev/5b3d3d9fb9f3
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20100924 Firefox/4.0b7pre ID:20100924110421
http://hg.mozilla.org/mozilla-central/rev/970453a7c6b9
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20100924 Firefox/4.0b7pre ID:20100924124032
blocking2.0: ? → betaN+
Alice, (taking a stab in the dark), do you see this if you enable d3d10 layers?
Assignee: nobody → bas.schouten
(Reporter)

Comment 12

7 years ago
(In reply to comment #11)
> Alice, (taking a stab in the dark), do you see this if you enable d3d10 layers?

layers.use-d3d10;true, It happens.
http://hg.mozilla.org/mozilla-central/rev/dee1e01fd8ed
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20101006 Firefox/4.0b7pre ID:20101006041601
So, this is a windowed plugin, so I'm not sure why our layer manager would matter at all to be honest! It seems like it's simply not being invalidated initially causing nothing to be drawn. I'm also not sure why this happens for this video, but not for others which use a different UI.
This appears to be more in jimm's domain. As per IRC discussion I'll leave this in his care for now :).
Assignee: bas.schouten → jmathies

Comment 15

7 years ago
(In reply to comment #12)
> (In reply to comment #11)
> > Alice, (taking a stab in the dark), do you see this if you enable d3d10 layers?
> 
> layers.use-d3d10;true, It happens.
> http://hg.mozilla.org/mozilla-central/rev/dee1e01fd8ed
> Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20101006
> Firefox/4.0b7pre ID:20101006041601

Alice, I'm only seeing this with dom.ipc.plugins.enabled=true. Does the problem go away for you with ipc disabled?
(Reporter)

Comment 16

7 years ago
(In reply to comment #15)
> (In reply to comment #12)
> > (In reply to comment #11)
> > > Alice, (taking a stab in the dark), do you see this if you enable d3d10 layers?
> > 
> > layers.use-d3d10;true, It happens.
> > http://hg.mozilla.org/mozilla-central/rev/dee1e01fd8ed
> > Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20101006
> > Firefox/4.0b7pre ID:20101006041601
> 
> Alice, I'm only seeing this with dom.ipc.plugins.enabled=true. Does the problem
> go away for you with ipc disabled?

It happens only condition of  layers.accelerate-all = true and dom.ipc.plugins.enabled=true.

Comment 17

7 years ago
Created attachment 481617 [details] [diff] [review]
update window patch

Hmm, thought I'd have an easy fix, but this doesn't address the problem. One thing I can confirm is that the initial update we send to the window includes the entire client area. Yet for some reason youtube's old player isn't painting it completely. Even if I pass NULL for the rect in InvalidateRect, it still doesn't paint.

Comment 18

7 years ago
Created attachment 481634 [details]
Screencast of flash painting problem.

The flash content window cover upon page scrolling the navigation buttons. For more info and video with bug, please look into the attachment.

Comment 19

7 years ago
(In reply to comment #18)
> Created attachment 481634 [details]
> Screencast of flash painting problem.
> 
> The flash content window cover upon page scrolling the navigation buttons. For
> more info and video with bug, please look into the attachment.

Isn't this glass problem filed in another bug?

Comment 20

7 years ago
Comment on attachment 477429 [details]
Plugin content is messed up after scrolling

(In reply to comment #5)
> Created attachment 477429 [details]
> Plugin content is messed up after scrolling
> 
> I found a layers problem when scrolling, too.
> 
> 1. Open http://www.flash-game.net/game/4826/extreme-safari.html
> 2. scroll
> 3. The plugin will be messed up (see screenshot)
> 
> I dunno it's another bug or not.
> 
> It's not the D2D, i turned off D2D this time. Fresh profile. Latest hourly
> build
> http://hg.mozilla.org/mozilla-central/rev/607938e4b608

this particular case WFM.
Attachment #477429 - Attachment is obsolete: true

Comment 21

7 years ago
Comment on attachment 477573 [details]
Flash Video problem

(In reply to comment #7)
> Created attachment 477573 [details]
> Flash Video problem

ditto here.
Attachment #477573 - Attachment is obsolete: true
OK I think I've figured this out.

While I was debugging something else I discovered that with D3D9 layers enabled, we're taking the PrintWindow path in nsObjectFrame::PaintPlugin when painting our test plugin. That is NOT supposed to happen, and it caused bug 579262 (i.e. the symptoms of this bug) for BasicLayers.

For BasicLayers, the fix was to propagate FLAG_DESTINED_FOR_SCREEN to the gfxContext we use to paint into BasicThebesLayer.

What do you know  --- D3D9 layers is not setting that flag. Nor are D3D10 and GL. I bet that's causing this bug.

I'll roll a patch shortly, just wanted to mention this in case I fall under a bus in the next few hours.
Created attachment 482808 [details] [diff] [review]
Part 1: Use nsDisplayList::IsPaintingToWindow instead of gfxContext::DESTINED_FOR_SCREEN

We can use the display list builder flag instead of the context flag. That means we no longer rely on the context flag being set properly, which fixes this bug.
Assignee: jmathies → roc
Attachment #482808 - Flags: review?(tnikkel)
The details of *why* this bug is caused by the absence of DESTINED_FOR_SCREEN are in bug 579262.
Created attachment 482811 [details] [diff] [review]
Part 2: remove DESTINED_FOR_SCREEN

No longer needed.
Attachment #482811 - Flags: review?(vladimir)
Whiteboard: [needs review]
Blocks: 598470
Comment on attachment 482808 [details] [diff] [review]
Part 1: Use nsDisplayList::IsPaintingToWindow instead of gfxContext::DESTINED_FOR_SCREEN

>@@ -2021,17 +2022,17 @@ nsObjectFrame::PaintPlugin(nsIRenderingC
>-    } else if (!(ctx->GetFlags() & gfxContext::FLAG_DESTINED_FOR_SCREEN)) {
>+    } else if (!aBuilder->IsPaintingToWindow()) {

When PresShell::RenderDocument calls nsLayoutUtils::PaintFrame with the widget layers flag the display list builder it creates will report as IsPaintingToWindow. Does this change do what we want in that situation?
Yes, I think so. When USE_WIDGET_LAYERS is set we have to paint the same layer contents every time or retained layers will get messed up. So we have to return the same thing for IsPaintingToWindow whenever someone passes USE_WIDGET_LAYERS.
Comment on attachment 482808 [details] [diff] [review]
Part 1: Use nsDisplayList::IsPaintingToWindow instead of gfxContext::DESTINED_FOR_SCREEN

Ok, makes sense.
Attachment #482808 - Flags: review?(tnikkel) → review+
Blocks: 599393
Attachment #482811 - Flags: review?(vladimir) → review+
Whiteboard: [needs review] → [needs landing]

Comment 29

7 years ago
same here https://bugzilla.mozilla.org/show_bug.cgi?id=590568
(Reporter)

Comment 30

7 years ago
(In reply to comment #29)
> same here https://bugzilla.mozilla.org/show_bug.cgi?id=590568

I think that it is a different bug
http://hg.mozilla.org/mozilla-central/rev/760cbafe478b
http://hg.mozilla.org/mozilla-central/rev/fbdc3be86de4
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]

Updated

7 years ago
Duplicate of this bug: 606906
Depends on: 622818

Comment 33

2 years ago
Hey I'm getting same problem here can you please take a look?

http://www.flashgamesbay.com/board-and-card/play-governor-of-poker
(In reply to benignant333 from comment #33)
> Hey I'm getting same problem here can you please take a look?
> 
> http://www.flashgamesbay.com/board-and-card/play-governor-of-poker

Thank you for commenting but please file a new bug report. Thanks.
You need to log in before you can comment on or make changes to this bug.