Open
Bug 870287
Opened 11 years ago
Updated 2 years ago
DisplayItemClip::AddOffsetAndComputeDifference doesn't take pixel snapping into account
Categories
(Core :: Layout, defect)
Tracking
()
NEW
People
(Reporter: mattwoodrow, Unassigned)
Details
Attachments
(1 file)
6.31 KB,
patch
|
Details | Diff | Splinter Review |
This is causing unnecessary invalidations and buffer self-copying in some cases.
Attachment #747327 -
Flags: review?(roc)
Comment on attachment 747327 [details] [diff] [review] Snap to pixels before comparing Review of attachment 747327 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/src/nsRect.h @@ +362,5 @@ > } > > +inline nsRect > +nsIntRect::ScaleToAppUnits(float aXScale, float aYScale, > + nscoord aAppUnitsPerPixel) const Shouldn't this be called ScaleToAppUnitsInverse? ::: layout/base/DisplayItemClip.cpp @@ +291,5 @@ > + nscoord aAppUnitsPerDevPixel) > +{ > + nsIntRect pixelRect = > + aRect.ScaleToNearestPixels(aXScale, aYScale, aAppUnitsPerDevPixel); > + return pixelRect.ScaleToAppUnits(aXScale, aYScale, aAppUnitsPerDevPixel); I don't really like this. The extra rounding caused by the conversion back to appunits could hurt us. Can we avoid that by comparing things in layer pixels and returning the difference in layer pixels?
Comment 2•10 years ago
|
||
(In reply to Matt Woodrow (:mattwoodrow) from comment #0) > This is causing unnecessary invalidations and buffer self-copying in some > cases. Do you have a testcase for this?
Reporter | ||
Comment 3•10 years ago
|
||
I don't remember, sorry. The initial bug comment is unfortunately pretty useless here.
Attachment #747327 -
Flags: review?(roc)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•