Last Comment Bug 585163 - [d2d] TEST-UNEXPECTED-FAIL | svg/text-scale-01.svg
: [d2d] TEST-UNEXPECTED-FAIL | svg/text-scale-01.svg
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Graphics (show other bugs)
: unspecified
: x86 Windows 7
: -- normal (vote)
: ---
Assigned To: Jeff Muizelaar [:jrmuizel]
:
:
Mentors:
Depends on:
Blocks: d2d-reftest
  Show dependency treegraph
 
Reported: 2010-08-06 13:46 PDT by Jeff Muizelaar [:jrmuizel]
Modified: 2011-11-25 08:11 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix the test case to use numbers that are exactly representable in floating point (1.53 KB, patch)
2010-08-07 14:38 PDT, Jeff Muizelaar [:jrmuizel]
roc: review+
Details | Diff | Splinter Review

Description Jeff Muizelaar [:jrmuizel] 2010-08-06 13:46:25 PDT
Looks like the geometry we send to d2d is different in the cases where we get different pixels. I'm not yet sure why.
Comment 1 Jeff Muizelaar [:jrmuizel] 2010-08-06 14:13:24 PDT
The values that get passed into D2D are different:

font_matrix	{xx=100.00000149011612 ...}
ctm	{xx=1.0000000474974513 ...}	

vs.

font_matrix	{xx=100.00000000000000  ...}
ctm	{xx=1.0000000000000000 ...}

Not exactly sure why.
Comment 2 Jeff Muizelaar [:jrmuizel] 2010-08-06 18:31:34 PDT
The inaccurate values for font_matrix come from converting 6/60 into a float and then treating it as a double. I see two possible fixes: we could add a AppUnitsToDoubleCSSPixels or AppUnitsToFloat64CSSPixels that would do the division at higher precision or we could switch the test to use sizes that have an exact representation in floating point instead of using .1 which does not.
Comment 3 Robert O'Callahan (:roc) (email my personal email if necessary) 2010-08-06 19:06:45 PDT
Or we could do something like gfxContext::NudgeCurrentMatrixToIntegers
Comment 4 Jeff Muizelaar [:jrmuizel] 2010-08-07 14:38:21 PDT
Created attachment 463842 [details] [diff] [review]
Fix the test case to use numbers that are exactly representable in floating point
Comment 5 Ali Juma [:ajuma] 2011-11-25 08:11:22 PST
This landed in August 2010:

http://hg.mozilla.org/mozilla-central/rev/237c0f3abaf6

Note You need to log in before you can comment on or make changes to this bug.