mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 730508. Clip canvas invalidations to the content area of the canvas. r=roc
Previously, operations like drawImage() could invalidate areas outside of the canvas. This hurt performance of runfield on maple.
This commit is contained in:
parent
b37485e0fc
commit
4c6fea1353
@ -709,6 +709,8 @@ nsHTMLCanvasElement::InvalidateCanvasContent(const gfxRect* damageRect)
|
||||
// then make it a nsRect
|
||||
invalRect = nsRect(realRect.X(), realRect.Y(),
|
||||
realRect.Width(), realRect.Height());
|
||||
|
||||
invalRect = invalRect.Intersect(nsRect(nsPoint(0,0), contentArea.Size()));
|
||||
}
|
||||
} else {
|
||||
invalRect = nsRect(nsPoint(0, 0), contentArea.Size());
|
||||
|
Loading…
Reference in New Issue
Block a user