Closed Bug 459150 Opened 16 years ago Closed 16 years ago

avoid non-pixel-aligned clips for mobile's DrawWindow usage

Categories

(Core :: Graphics, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: vlad, Assigned: vlad)

References

Details

Attachments

(2 files)

Non-pixel-aligned clips hurt a lot, so avoid them as much as possible. Mobile currently sets a native cairo scale before calling DrawWindow, so even though gecko code tries to keep everything pixel-aligned, it fails in this case due to a CTM with scale. This patch adds a few tweaks in #ifdef MOZ_GFX_MOBILE_OPTIMIZE and explicitly tells Rectangle() to snap coordinates and ignore scale (by default it only snaps if there's just a translation and not a scale). Some of these may be good in general, but for now keep them behind that #ifdef until we can figure out what weird interactions there might be with this. (As a bonus, we can avoid a temporary surface inside DrawWindow here in a common case.)
Attachment #342340 - Flags: review?(pavlov)
Attached patch add your thing to configure (deleted) — Splinter Review
Attachment #342359 - Flags: review?(vladimir)
Attachment #342340 - Flags: review?(pavlov) → review+
Blocks: 441364
Comment on attachment 342359 [details] [diff] [review] add your thing to configure That's fine, I'll roll it in to my patch when I check in.
Attachment #342359 - Flags: review?(vladimir) → review+
Checked this in; it's causing some rounding problems with drawWindow, noticable as slight shifts when the display is repainted, but it's not horrible. I think this is the rect rounding that's happening directly in the drawWindow call. We can probably resolve this in fennec directly by being smarter about picking coordinates to start the draw on...
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: