Closed Bug 1539702 Opened 9 months ago Closed 6 months ago

Improve CreateClippedDrawTarget API


(Core :: Graphics, enhancement, P2)




Tracking Status
firefox69 --- fixed


(Reporter: jrmuizel, Assigned: jrmuizel)


(Blocks 1 open bug)


(Whiteboard: [wr-q4])


(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:

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

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
Improve CreateClippedDrawTarget API r=jwatt,rhunt
Pushed by
Improve CreateClippedDrawTarget API r=jwatt,rhunt
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) ==


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

For up to date results, see:

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