Closed
Bug 1231864
Opened 9 years ago
Closed 9 years ago
De-weirdify GetCairo() and its uses
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla46
| Tracking | Status | |
|---|---|---|
| firefox46 | --- | fixed |
People
(Reporter: n.nethercote, Assigned: n.nethercote)
Details
Attachments
(2 files, 1 obsolete file)
|
1.51 KB,
patch
|
mattwoodrow
:
review+
n.nethercote
:
checkin+
|
Details | Diff | Splinter Review |
|
6.38 KB,
patch
|
mattwoodrow
:
review+
n.nethercote
:
checkin+
|
Details | Diff | Splinter Review |
GetCairo()'s an odd function, in that it gets the current DrawTarget's cairo_t if it uses a Cairo backend, and falls back to the refCairo (which has a 1x1 surface) otherwise. Some of the callsites rely on the non-fallback behaviour.
This bug is about clarifying and simplifying this a bit.
| Assignee | ||
Comment 1•9 years ago
|
||
GetCairo() never returns null so testing its result like this is pointless.
Attachment #8697459 -
Flags: review?(matt.woodrow)
| Assignee | ||
Updated•9 years ago
|
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
| Assignee | ||
Comment 2•9 years ago
|
||
This patch inlines the CurrentSurface() and GetDCWithClip() calls in
BeginNativeDrawing(). This allows them to share a single |cairo_t*| and gets
rid of the GetCairo() call in GetDCWithClip(), which was one of those confusing
ones that only made sense if its a Cairo backend.
The patch also inverts the sense of mDeviceOffset, and changes its type from
gfxPoint to Point.
Attachment #8697461 -
Flags: review?(matt.woodrow)
| Assignee | ||
Comment 3•9 years ago
|
||
This is a cut down version of part 1 from bug 1231550. It avoids one GetCairo()
calls.
Attachment #8697463 -
Flags: review?(jfkthame)
Updated•9 years ago
|
Attachment #8697459 -
Flags: review?(matt.woodrow) → review+
Comment 4•9 years ago
|
||
Comment on attachment 8697461 [details] [diff] [review]
(part 2) - Clean up gfxWindowsNativeDrawing::BeginNativeDrawing()
Review of attachment 8697461 [details] [diff] [review]:
-----------------------------------------------------------------
It would be nice to do a follow up that removes gfxASurface usage from this too.
It looks like we check GetType, GetContentType, MarkDirty and GetAsImageSurface on surf/mWinSurface/mBackSurface/mWhiteSurface. Those should all be fairly easy inlined.
Attachment #8697461 -
Flags: review?(matt.woodrow) → review+
| Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/747868feec5183a7bdea401472dce1dcdc31d137
Bug 1231864 (part 1) - Remove useless GetCairo() call in gfxWindowsNativeDrawing::BeginNativeDrawing(). r=mattwoodrow.
https://hg.mozilla.org/integration/mozilla-inbound/rev/5d48e09f0d179ab78efec9cca157e6f2aee09c16
Bug 1231864 (part 2) - Clean up gfxWindowsNativeDrawing::BeginNativeDrawing(). r=mattwoodrow.
| Assignee | ||
Updated•9 years ago
|
Attachment #8697459 -
Flags: checkin+
| Assignee | ||
Updated•9 years ago
|
Attachment #8697461 -
Flags: checkin+
| Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8697463 [details] [diff] [review]
(part 3) - Pass a cairo_t* to GetSVGGlyphExtents()
I'll move this patch to another bug.
Attachment #8697463 -
Attachment is obsolete: true
Attachment #8697463 -
Flags: review?(jfkthame)
| Assignee | ||
Updated•9 years ago
|
Keywords: leave-open
Comment 8•9 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/747868feec51
https://hg.mozilla.org/mozilla-central/rev/5d48e09f0d17
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in
before you can comment on or make changes to this bug.
Description
•