Closed Bug 1161978 Opened 7 years ago Closed 6 years ago

Repaint corruption on nested CSS transitions due to OMTC

Categories

(Core :: Graphics: Layers, defect)

37 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla47
Tracking Status
firefox37 --- affected
firefox38 --- affected
firefox39 --- affected
firefox40 --- affected
firefox47 --- fixed

People

(Reporter: oo.rio.oo, Assigned: sotaro)

References

()

Details

(Keywords: regression, testcase, Whiteboard: [gfx-noted])

Attachments

(1 file, 5 obsolete files)

Attached image Transition repaint corruption whe (obsolete) —
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0
Build ID: 20150415140819

Steps to reproduce:

Given a simple HTML page with two nested elements that both have a CSS transform set and both have a CSS transition set on said transform:
http://jsfiddle.net/txwphwsz/

Trigger the transition to occur (in case of the cited reduced example: by hovering the mouse cursor over the element).




Actual results:

When OMTC is enabled (layers.offmainthreadcomposition.enabled : true), repaint is corrupted and several dirty areas are left behind as the nested elements' transforms shift their transitions.
(See attached PNG file)

When OMTC is disabled (layers.offmainthreadcomposition.enabled : false), repaint is not corrupted and everything looks and behaves OK.


Expected results:

No repaint corruption should occur when OMTC is enabled.
Reproduces on atleast two workstations, with the following graphics settings grabbed from about:support


Graphics
--------

Adapter Description: NVIDIA NVS 315
Adapter Drivers: nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Adapter RAM: 1024
Device ID: 0x107c
Direct2D Enabled: true
DirectWrite Enabled: true (6.3.9600.17415)
Driver Date: 2-5-2015
Driver Version: 9.18.13.4752
GPU #2 Active: false
GPU Accelerated Windows: 1/1 Direct3D 11 (OMTC)
Subsys ID: 102f10de
Vendor ID: 0x10de
WebGL Renderer: Google Inc. -- ANGLE (NVIDIA NVS 315 Direct3D11 vs_5_0 ps_5_0)
windowLayerManagerRemote: true
AzureCanvasBackend: direct2d 1.1
AzureContentBackend: direct2d 1.1
AzureFallbackCanvasBackend: cairo
AzureSkiaAccelerated: 0


Graphics
--------

Adapter Description: NVIDIA NVS 300
Adapter Drivers: nvd3dumx,nvwgf2umx,nvwgf2umx nvd3dum,nvwgf2um,nvwgf2um
Adapter RAM: 512
ClearType Parameters: Gamma: 1800 Pixel Structure: R ClearType Level: 100 Enhanced Contrast: 50
Device ID: 0x10d8
Direct2D Enabled: true
DirectWrite Enabled: true (6.2.9200.16571)
Driver Date: 3-4-2014
Driver Version: 9.18.13.3276
GPU #2 Active: false
GPU Accelerated Windows: 1/1 Direct3D 11 (OMTC)
Subsys ID: 086210de
Vendor ID: 0x10de
WebGL Renderer: Google Inc. -- ANGLE (NVIDIA NVS 300 Direct3D11 vs_4_1 ps_4_1)
windowLayerManagerRemote: true
AzureCanvasBackend: direct2d 1.1
AzureContentBackend: direct2d 1.1
AzureFallbackCanvasBackend: cairo
AzureSkiaAccelerated: 0
Also; this bug appears to *not* reproduce in Firefox 36.
OS: Unspecified → Windows 7
Product: Firefox → Core
Hardware: Unspecified → x86_64
Pushlog:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=2a61df4eaa2d&tochange=24ba8274ed60

Via local build:
Last Good: 2a61df4eaa2d
First Bad: 823227372483

Regressed by: 	823227372483	Bas Schouten — Bug 1107297: Only recomposite the damaged rect with D3D11
Blocks: 1107297
Status: UNCONFIRMED → NEW
Ever confirmed: true
Component: Untriaged → Graphics: Layers
Keywords: testcase
I confirmed the problem. I take a look.
Assignee: nobody → sotaro.ikeda.g
Whiteboard: [gfx-noted]
When the problem happen, PaintedLayerComposite seemed not invalidated correctly. Its parent had only one child layer, when the problem happened.

>      ContainerLayerComposite (0x1dad3800) [shadow-clip=(x=2, y=243, w=2534, h=1144)] [shadow-transform=[ 1 0; 0 1; 218 259; ]] [shadow-visible=< (x=-100, y=0, w=200, h=200); >] [clip=(x=2, y=243, w=2534, h=1144)] [transform=[ 1 0; 0 1; 218 259; ]] [visible=< (x=-100, y=0, w=200, h=200); >]
>        ContainerLayerComposite (0x1dad3c00) [shadow-transform=[ 1 0; 0 1; -100 0; ]] [shadow-visible=< (x=0, y=0, w=200, h=200); >] [transform=[ 1 0; 0 1; -100 0; ]] [visible=< (x=0, y=0, w=200, h=200); >]
>          PaintedLayerComposite (0x1dad4000) [shadow-visible=< (x=0, y=0, w=200, h=200); >] [bounds=(x=-1, y=0, w=201, h=200)] [visible=< (x=0, y=0, w=200, h=200); >] [opaqueContent] [valid=< (x=0, y=0, w=200, h=200); >]
>            ContentHost (0x1b1a6f70) [buffer-rect=(x=0, y=0, w=200, h=200)] [buffer-rotation=(0,0)] [paint-will-resample]
>              TextureHost (0xddec790) [size=(w=200, h=200)] [format=SurfaceFormat::B8G8R8X8] [flags=NoFlags]
ContainerLayerProperties::ComputeChangeInternal() did not add child layer's OldTransformedBounds(), when the problem happned.
The patch addressed the problem on my pc.
Attachment #8602031 - Attachment is obsolete: true
Attachment #8715708 - Flags: review?(matt.woodrow)
Attachment #8715708 - Flags: review?(matt.woodrow)
Attachment #8715708 - Attachment is obsolete: true
(In reply to Sotaro Ikeda [:sotaro] from comment #6)
> ContainerLayerProperties::ComputeChangeInternal() did not add child layer's
> OldTransformedBounds(), when the problem happned.

This is not a problem. The region should be invalidated by ContainerLayerProperties.
Effective visible region is updated by LayerManagerComposite::PostProcessLayers(). It seems to affect to the problem.
The patch seems to address the problem.
It seems better to use EffectiveVisibleRegion to get OldTransformedBounds. But it could be culled by LayerManagerComposite::PostProcessLayers(). So, it might not fit to NewTransformedBounds.
The patch addressed the problem on my pc.
Attachment #8716164 - Attachment is obsolete: true
Attachment #8716181 - Flags: review?(matt.woodrow)
Comment on attachment 8716181 [details] [diff] [review]
patch - Use GetEffectiveVisibleRegion() for ContainerLayer invalidation

Review of attachment 8716181 [details] [diff] [review]:
-----------------------------------------------------------------

Can we just use the EffectiveVisibleRegion for all layer types?
Attachment #8716181 - Flags: review?(matt.woodrow) → review+
(In reply to Matt Woodrow (:mattwoodrow) from comment #16)
> Comment on attachment 8716181 [details] [diff] [review]
> patch - Use GetEffectiveVisibleRegion() for ContainerLayer invalidation
> 
> Review of attachment 8716181 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Can we just use the EffectiveVisibleRegion for all layer types?

I re-checked the code. It seems ok to use the EffectiveVisibleRegion for all layer types for old bound.
Apply the comment. Carry r=matt.woodrow.
Attachment #8716181 - Attachment is obsolete: true
Attachment #8716831 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/8ab285f08e31
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
See Also: → 1247452
See Also: → 1248822
Duplicate of this bug: 1261628
Duplicate of this bug: 1204336
You need to log in before you can comment on or make changes to this bug.