Closed Bug 1637209 Opened 5 years ago Closed 2 years ago

Huge lag when a background changes color when it has an SVG filter effect overlayd

Categories

(Core :: SVG, defect)

76 Branch
defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: gauthierarun, Unassigned)

References

Details

Attachments

(1 file)

Attached file example of the lag (deleted) —

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

  1. Run the attachment.
  2. Click on the button (id="button_container").
  3. Change button_container's size to various sizes.
    examples:
    style="width:100px;height:100px;position:absolute"
    style="width:20000px;height:50000px;position:absolute"

Actual results:

When clicked on button_container, there's almost no lag when button_container's size is small, and huge lag when it is large, and the color hangs on orange for a while.

Expected results:

No lag. Not even when there's fast consecutive clicking of button_container. Chrome doesn't have this issue, even with fast consecutive clicking.

Removing filter:url(#filter950) in button_foreground's style makes the lag disappear.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → SVG
Product: Firefox → Core

If you turn off webrender does this still happen?

Flags: needinfo?(gauthierarun)

@Robert Longson, yes it still happens. It was turned off by default. WebRender doesn't seem supported:

Beslissingenlogboek DIRECT2D
> +------------------------------------------------------------------------+
> | Op blokkeerlijst; foutcode BLOCKLIST_FEATURE_FAILURE_DL_BLACKLIST_g984 |
> +------------------------------------------------------------------------+

D3D11_HW_ANGLE
> +----------------------------------------------------------------------+
> | Geblokkeerd vanwege bekende problemen[bug                            |
> | 1153381](https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=1153381)    |
> +----------------------------------------------------------------------+

WEBRENDER
> +----------------------------------------------------+
> | opt-in by default: WebRender is an opt-in feature  |
> +----------------------------------------------------+
> | available by user: Force enabled by pref           |
> +----------------------------------------------------+
> | unavailable-no-angle by runtime: ANGLE is disabled |
> +----------------------------------------------------+

WEBRENDER_QUALIFIED
> +------------------------------------------------------+
> | blocked by env: Battery Intel requires os compositor |
> +------------------------------------------------------+

WEBRENDER_COMPOSITOR
> +------------------------------------------------+
> | unavailable by env: No DirectComposition usage |
> +------------------------------------------------+

OMTP
> +---------------------------------------------------------------------+
> | broken by runtime: OMTP is not supported on 32-bit with \<= 2 cores |
> +---------------------------------------------------------------------+

ADVANCED_LAYERS
> +--------------------------------------------------------------+
> | available by user: Enabled for Windows 7 via user-preference |
> +--------------------------------------------------------------+

WEBGPU
> +-----------------------------------------------------------+
> | disabled by default: Disabled by default                  |
> +-----------------------------------------------------------+
> | blocked by runtime: WebGPU can only be enabled in nightly |
> +-----------------------------------------------------------+
Flags: needinfo?(gauthierarun)

I can also reproduce on MacOS 10.14 with and without WebRender enabled.

mstange: Maybe you have an idea what's going on?

Severity: -- → S3
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(mstange)

The lag comes from the computation of the blur in software.
When WebRender is enabled, we have a fast path for SVG filters that are only a blur, but only if the x and y blur radii are the same. The filter in this testcase has stdDeviation="3.01 3.51587". Changing that to stdDeviation="3.51587" makes the testcase much faster for me when WebRender is enabled.

Flags: needinfo?(mstange.moz)
Depends on: 1656711

Seems OK now.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: