Closed Bug 1013540 Opened 11 years ago Closed 7 years ago

Skia gradients are biased downwards

Categories

(Core :: Graphics, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: jrmuizel, Assigned: lsalzman)

References

Details

(Whiteboard: [skia-upstream])

Attachments

(1 file, 3 obsolete files)

Attached patch Remove bias from gradients (obsolete) (deleted) — Splinter Review
No description provided.
Blocks: skia-reftest
Whiteboard: [skia-upstream]
Attached patch Remove bias from gradients (obsolete) (deleted) — Splinter Review
Attachment #8425728 - Attachment is obsolete: true
Attached patch Remove bias from gradients (obsolete) (deleted) — Splinter Review
This removes the 0.5 bias that was added before doing the transformation. A similar thing is done in AFFINE_FILTER_NAME in SkBitmapProcState_matrix.h
Attachment #8425778 - Attachment is obsolete: true
George, can you get this upstreamed?
Flags: needinfo?(gwright)
I can try
Flags: needinfo?(gwright)
Depends on: 1168879
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
The issue is more or less as the previous patch describes, that when linear filtering is applied we need to make sure we subtract the offset of half a texel. However, we need to ensure that this only happens when we are actually doing a form of linear filtering. This only occurs in shadeSpan_linear_vertical_lerp - a strictly vertical gradient in the 32bpp case. The other cases don't try to emulate any sort of linear filtering so shouldn't have the half-texel offset. The fix ends up just being a one-liner.
Attachment #8471774 - Attachment is obsolete: true
Attachment #8667536 - Flags: review?(jmuizelaar)
No longer depends on: 1168879
Attachment #8667536 - Flags: review?(jmuizelaar) → review+
This code no longer exists in recent versions of Skia, so I am going to mark this as invalid. If a similar issue turns up in the new Skia code, we can file a new bug.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: