Closed
Bug 895007
Opened 11 years ago
Closed 11 years ago
Handle zero size native drawing more gracefully.
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: jrmuizel, Assigned: jrmuizel)
Details
Attachments
(1 file)
1.04 KB,
patch
|
mattwoodrow
:
review+
|
Details | Diff | Splinter Review |
This is causing crashes with CoreGraphics Azure.
Attachment #777236 -
Flags: review?(matt.woodrow)
Comment 1•11 years ago
|
||
Comment on attachment 777236 [details] [diff] [review] Handle zero size native drawing more gracefully. Review of attachment 777236 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/thebes/gfxQuartzNativeDrawing.cpp @@ +43,5 @@ > IntSize backingSize(NSToIntFloor(mNativeRect.width * mBackingScale), > NSToIntFloor(mNativeRect.height * mBackingScale)); > + > + if (backingSize.IsEmpty()) > + return nullptr; Couldn't we assert that mBackingScale is never 0, and then move this check up to the root scope of this function? Seems better than having the overhead of borrowing our CGContext, or creating an temporary cairo surface if nothing is going to be drawn.
Updated•11 years ago
|
Attachment #777236 -
Flags: review?(matt.woodrow) → review+
Comment 2•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/605f61628a4b
Assignee: nobody → jmuizelaar
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25
You need to log in
before you can comment on or make changes to this bug.
Description
•