Closed Bug 1539702 Opened 9 months ago Closed 6 months ago

Improve CreateClippedDrawTarget API

Categories

(Core :: Graphics, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: jrmuizel, Assigned: jrmuizel)

References

(Blocks 1 open bug)

Details

(Whiteboard: [wr-q4])

Attachments

(1 file)

I want to make more of the information internal to Moz2D so that it's easier to make things offset invariant for blob recoordination

Blocks: blob-recoord
Blocks: wr-68
Priority: -- → P3
Priority: P3 → P2
Blocks: 1531942

There's bugs with my latest attempt: https://treeherder.mozilla.org/#/jobs?repo=try&revision=437700352696d31b818d3a932134aa474593a1fa&selectedJob=239449442

layout/reftests/svg/svg-integration/clipPath-transformed-html-01.xhtml is probably a good one to tackle first.

Whiteboard: [wr-q2][wr-may]
Blocks: wr-69
No longer blocks: wr-68

This changes CreateClippedDrawTarget so that instead of taking
a max size and a transform it just takes a user space rect of
the desired bounds.

This change allows the caller to not worry about the computing
a max size based on the current clip. Instead this responsibility
is lowered into the specific backends.

The main motivation for this work is to allow blob recoordination
to create recordings that don't depend on the current clip.

Some additional benefits are that the API is easier to use and
as can be seen simplifies the SVG masking code because it doesn't
need to track surface offsets manually.

It's also an important step towards removing all the uses of
gfxContext::GetClipExtents which will let us get rid of the separate
clipping stack in gfxContext and help us move off of gfxContext
completely.

Most backend implementations of CreateClippedDrawTarget are relatively
simple. However things are more complicated for DrawTargetCapture
because of its lazy resolution. The solution to this is explained
in the comments at the definition of the ResolveTarget struct.

Depends on: 1556421
Depends on: 1556466
Depends on: 1556468
Depends on: 1556505
Depends on: 1556473
Depends on: 1556470
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/88e6c989e783
Improve CreateClippedDrawTarget API r=jwatt,rhunt
Pushed by jmuizelaar@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ba22d4def27f
Improve CreateClippedDrawTarget API r=jwatt,rhunt
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69
Assignee: nobody → jmuizelaar
Flags: needinfo?(jmuizelaar)

== Change summary for alert #21598 (as of Wed, 26 Jun 2019 05:51:50 GMT) ==

Improvements:

4% raptor-motionmark-htmlsuite-firefox linux64-shippable opt 29.86 -> 30.97

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=21598

Whiteboard: [wr-q2][wr-may] → [wr-q4]
You need to log in before you can comment on or make changes to this bug.