Gecko:Image Snapping and Rendering: Difference between revisions

Jump to navigation Jump to search
Line 46: Line 46:
* Compute device pixel draw rectangle by intersecting the device pixel fill rectangle with the dirty rectangle scaled to device pixels and rounded out. This is the area to cairo_fill. But only intersect with the dirty rect if the transformation from image space to device space is a translation by whole pixels; otherwise there may be filtering which would cause edge pixel values to be affected by the dirty rect intersection.
* Compute device pixel draw rectangle by intersecting the device pixel fill rectangle with the dirty rectangle scaled to device pixels and rounded out. This is the area to cairo_fill. But only intersect with the dirty rect if the transformation from image space to device space is a translation by whole pixels; otherwise there may be filtering which would cause edge pixel values to be affected by the dirty rect intersection.


Requirement 2 is obviously satisfied since the dirty rect is only used to constrain the filled area and does not affect the mapping from image space to device space. Requirements 3, 4, 5 and 6 are satisfied by construction.
Requirement 2 is satisfied since the dirty rect is only used to constrain the filled area, and only when filtering does not occur. Requirements 3, 4, 5, 6 and 7 are satisfied by construction.


This is really the only sensible algorithm that could satisfy the above requirements.
Requirement 8 is difficult to prove.
1,295

edits

Navigation menu