If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Repaint corruption on nested CSS transitions due to OMTC

RESOLVED FIXED in Firefox 47

Status

()

Core
Graphics: Layers
RESOLVED FIXED
2 years ago
2 years ago

People

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

Tracking

({regression, testcase})

37 Branch
mozilla47
x86_64
Windows 7
regression, testcase
Points:
---

Firefox Tracking Flags

(firefox37 affected, firefox38 affected, firefox39 affected, firefox40 affected, firefox47 fixed)

Details

(Whiteboard: [gfx-noted], URL)

Attachments

(1 attachment, 5 obsolete attachments)

(Reporter)

Description

2 years ago
Created attachment 8602031 [details]
Transition repaint corruption whe

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.
(Reporter)

Comment 1

2 years ago
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
(Reporter)

Comment 2

2 years ago
Also; this bug appears to *not* reproduce in Firefox 36.
Component: Untriaged → Untriaged
Keywords: regression, regressionwindow-wanted
OS: Unspecified → Windows 7
Product: Firefox → Core
Hardware: Unspecified → x86_64

Comment 3

2 years ago
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
status-firefox37: --- → affected
status-firefox38: --- → affected
status-firefox39: --- → affected
status-firefox40: --- → affected
Ever confirmed: true
Keywords: regressionwindow-wanted
Component: Untriaged → Graphics: Layers
Keywords: testcase
(Assignee)

Comment 4

2 years ago
I confirmed the problem. I take a look.
Assignee: nobody → sotaro.ikeda.g
Whiteboard: [gfx-noted]
(Assignee)

Comment 5

2 years ago
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]
(Assignee)

Comment 6

2 years ago
ContainerLayerProperties::ComputeChangeInternal() did not add child layer's OldTransformedBounds(), when the problem happned.
(Assignee)

Comment 7

2 years ago
Created attachment 8715708 [details] [diff] [review]
patch - Fix adding child layer's OldTransformedBounds()

The patch addressed the problem on my pc.
Attachment #8602031 - Attachment is obsolete: true
(Assignee)

Updated

2 years ago
Attachment #8715708 - Flags: review?(matt.woodrow)
(Assignee)

Updated

2 years ago
Attachment #8715708 - Flags: review?(matt.woodrow)
(Assignee)

Updated

2 years ago
Attachment #8715708 - Attachment is obsolete: true
(Assignee)

Comment 8

2 years ago
(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.
(Assignee)

Comment 9

2 years ago
Effective visible region is updated by LayerManagerComposite::PostProcessLayers(). It seems to affect to the problem.
(Assignee)

Comment 10

2 years ago
Created attachment 8716164 [details] [diff] [review]
patch - Use GetEffectiveVisibleRegion() for layer invalidation

The patch seems to address the problem.
(Assignee)

Comment 11

2 years ago
It seems better to use EffectiveVisibleRegion to get OldTransformedBounds. But it could be culled by LayerManagerComposite::PostProcessLayers(). So, it might not fit to NewTransformedBounds.
(Assignee)

Comment 12

2 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=39488dee9ae9
(Assignee)

Comment 13

2 years ago
Created attachment 8716180 [details] [diff] [review]
patch - Use GetEffectiveVisibleRegion() for ContainerLayer invalidation

The patch addressed the problem on my pc.
Attachment #8716164 - Attachment is obsolete: true
(Assignee)

Comment 14

2 years ago
Created attachment 8716181 [details] [diff] [review]
patch - Use GetEffectiveVisibleRegion() for ContainerLayer invalidation
Attachment #8716180 - Attachment is obsolete: true
(Assignee)

Comment 15

2 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=11d7089d192d
(Assignee)

Updated

2 years ago
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+
(Assignee)

Comment 17

2 years ago
(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.
(Assignee)

Comment 18

2 years ago
Created attachment 8716831 [details] [diff] [review]
patch - Use GetEffectiveVisibleRegion() for Layer invalidation

Apply the comment. Carry r=matt.woodrow.
Attachment #8716181 - Attachment is obsolete: true
Attachment #8716831 - Flags: review+

Comment 19

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/8ab285f08e31

Comment 20

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8ab285f08e31
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox47: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
See Also: → bug 1246449

Updated

2 years ago
See Also: → bug 1247452

Updated

2 years ago
See Also: → bug 1248822

Updated

2 years ago
Duplicate of this bug: 1261628

Updated

2 years ago
Duplicate of this bug: 1204336
You need to log in before you can comment on or make changes to this bug.