Open Bug 1029085 Opened 10 years ago Updated 2 years ago

Skia's SuperBlitter and MaskSuperBlitter produce different results

Categories

(Core :: Graphics, defect)

x86_64
Windows 7
defect

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

References

Details

Attachments

(2 files, 1 obsolete file)

This causes marker-orientation-01.svg and marker-orientation-02.svg to fail.

It's not completely clear to me which one is correct, but this makes them the same.

Drawing a triangle with these points shows the different results

+		[0]	{fX=25.000000 fY=10.000000 }	SkPoint
+		[1]	{fX=35.000000 fY=20.000000 }	SkPoint
+		[2]	{fX=25.000000 fY=30.000000 }	SkPoint
Blocks: skia-reftest
Attachment #8444631 - Attachment is obsolete: true
Comment on attachment 8470858 [details] [diff] [review]
The actual patch this time

Review of attachment 8470858 [details] [diff] [review]:
-----------------------------------------------------------------

Here's some rationale:

::: gfx/skia/trunk/src/core/SkScan_AntiPath.cpp
@@ +464,5 @@
>  static void add_aa_span(uint8_t* alpha, U8CPU startAlpha, int middleCount,
>                          U8CPU stopAlpha, U8CPU maxValue) {
>      SkASSERT(middleCount >= 0);
>  
> +    if (startAlpha) {

This matches SkAlphaRuns::add() and is needed now that we allow add_aa_span to take a startAlpha of 0

@@ +548,5 @@
>      } else {
> +        if (fb == 0)
> +            n += 1;
> +        else
> +            fb = SCALE - fb;

SuperBlitter::blitH has this same test.
This version adds one branch instead of two. The branch also has the possibility to avoid extra work because we only do the first part of add_aa_span when needed.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: