Open Bug 1064055 Opened 10 years ago Updated 2 years ago

Make all code that changes DrawTarget transforms use the Moz2D API directly

Categories

(Core :: Graphics, defect)

defect

Tracking

()

People

(Reporter: jwatt, Assigned: jwatt)

References

(Blocks 3 open bugs)

Details

Attachments

(1 file)

We should make all code that changes DrawTarget transforms use the Moz2D API directly instead of using gfxContext or nsRenderingContext API.
Depends on: 1064056
Depends on: 1064084
Attachment #8487856 - Flags: review?(bas)
Blocks: 1060762
Comment on attachment 8487856 [details] [diff] [review]
kill gfxContext::Multiply()

Review of attachment 8487856 [details] [diff] [review]:
-----------------------------------------------------------------

So much awesome that I missed to review.
Attachment #8487856 - Flags: review?(bas) → review+
jwatt: is this still worth landing?
Flags: needinfo?(jwatt)
It's worth landing if it's not buggy. I'm trying to remember why I didn't land this though.

To be safe, we need to be sure that there will not be any save-restore of gfxContext::mTransform (e.g. via gfxContextMatrixAutoSaveRestore) between any points where we set and restore a DrawTarget::mTransform. This is because the code that restores gfxContext::mTransform has no knowledge of changes that are made directly to DrawTarget::mTransform, yet it restores the state on both the gfxContext and DrawTarget. If that happens between a save-restore of DrawTarget::mTransform then the wrong state will be temporarily set on the DrawTarget.

I don't think I'd noticed this issue at the time of writing this patch, and I think some of the changes in this patch may potentially be buggy as a result despite the patch passing Try. I'll dig into the code at some point when I have time.
Flags: needinfo?(jwatt)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: