Transform animations on layers are not updated when the transform is the identity matrix

RESOLVED INVALID

Status

()

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

People

(Reporter: birtles, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(firefox48 affected)

Details

(Whiteboard: gfx-noted)

(Reporter)

Description

2 years ago
The following test fails:

addAsyncAnimTest(function *() {
  var [ div ] = new_div("");
  var animation = div.animate(
    [ { transform: 'translate(0px)', easing: "steps(2, end)" },
      { transform: 'translate(100px)' } ], 4000);
  yield waitForPaints();
  advance_clock(500);
  omta_is(div, "transform", { tx: 0 }, RunningOn.Compositor,
          "Animation is running on compositor");

  animation.effect.timing.duration = 2000;
  yield waitForPaints();
  advance_clock(1000);
  omta_is(div, "transform", { tx: 50 }, RunningOn.Compositor,
          "Animation is running on compositor");
  done_div();
});

An equivalent test with steps(2, start) passes, however. Yet, using steps(2, start) and initially seeking using advance_clock(0), it fails. It seems like when our initial value is effectively 'translate(0px)' (i.e. identity matrix) it fails. I suspect there is some optimization taking place somewhere where we see an identity matrix and skip doing layer updates.
Timothy, you might know more about this.
Flags: needinfo?(tnikkel)
Whiteboard: gfx-noted
(Reporter)

Comment 2

2 years ago
Actually, I think this bug is bogus. We should be calling advance_clock(0) directly after updating the duration. Sorry for the noise.
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Flags: needinfo?(tnikkel)
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.