/irc-logs / w3c / #css / 2010-09-10 / end

Options:

  1. # Session Start: Fri Sep 10 00:00:00 2010
  2. # Session Ident: #css
  3. # [00:13] * Quits: nimbupani (nimbupani@24.22.131.46) (Quit: nimbupani)
  4. # [00:21] <dbaron> tabatkins, do you have blur radius tests anywhere?
  5. # [00:22] <tabatkins> I have some custom tests that rely on taking a screenshot of the browser's rendering, chopping it appropriately, then using it with <canvas>.
  6. # [00:23] * tabatkins wishes he could do screengrabs from <canvas>, as it would make these super-easy.
  7. # [00:26] <dbaron> so I changed our radius calculation, but I can't actually see the difference on
  8. # [00:26] <dbaron> http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0Ap%20{%0Aheight%3A%20100px%3B%0Awidth%3A%20100px%3B%0Abackground%3A%20blue%3B%0A-moz-box-shadow%3A%20100px%200%20100px%20green%3B%0A}%0A%0A%3C%2Fstyle%3E%0A%3Cp%3E
  9. # [00:29] <dbaron> though apparently I should have increased the blur by a factor of 2.81
  10. # [00:30] <dbaron> Does it sound right that Gecko's blur was 2.81x too small?
  11. # [00:30] <dbaron> oh, wait, sorry
  12. # [00:30] <tabatkins> Uh, I don't think so.
  13. # [00:30] <dbaron> 1.40x
  14. # [00:31] <tabatkins> Yeah, that's about right I think.
  15. # [00:31] * tabatkins can't recall exactly what the old blur results were.
  16. # [00:32] <dbaron> so apparently I can't see the different for a 1.4x change in blur radius
  17. # [00:32] <tabatkins> If you can get me a screenshot of a complete blur where the original shadow edge is in the exact center, I can run it through my comparison test.
  18. # [00:33] <dbaron> what size blur?
  19. # [00:33] <dbaron> something like '-moz-box-shadow: 50px 50px 100px green'?
  20. # [00:34] <tabatkins> Yeah, that'll work. Prefer a black shadow, just so I have to change less.
  21. # [00:35] <dbaron> ok, I'll use http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0Ap%20%7B%0Aheight%3A%20100px%3B%0Awidth%3A%20100px%3B%0A-moz-box-shadow%3A%2050px%2050px%20100px%20black%3B%0A%7D%0A%0A%3C%2Fstyle%3E%0A%3Cp%3E
  22. # [00:37] <dbaron> tabatkins, http://dbaron.org/tmp/newblur.png
  23. # [00:38] <dbaron> there's stuff visible past the radius, though, so I'm wondering if that's wrong
  24. # [00:38] <tabatkins> Cool, gimme a sec and I'll get the test set up.
  25. # [00:38] <tabatkins> And compare it to current FF's rendering too.
  26. # [00:38] <dbaron> I think it might be a factor of 3/2 too large, though
  27. # [00:39] <tabatkins> What value does your graphics library take as input?
  28. # [00:39] <dbaron> it's a box blur parameter
  29. # [00:39] <dbaron> there's code to compute that box blur param from a standard deviation
  30. # [00:39] <tabatkins> kk
  31. # [00:39] <dbaron> and the formula that code implements differs from what's in the SVG spec by a factor of 3/2
  32. # [00:40] <tabatkins> Interesting.
  33. # [00:41] <tabatkins> Yeah, that looks too big. There shouldn't be anything immediately visible out past 100px.
  34. # [00:43] <dbaron> that means we're wrong by 3/2 for our <canvas> impl
  35. # [00:43] <dbaron> and wrong by 0.94 for our text-shadow/box-shadow impl
  36. # [00:43] <tabatkins> Interesting.
  37. # [00:52] <dbaron> oh, except our canvas impl has another bug
  38. # [00:52] <tabatkins> Hrm, I forgot that my current compare code is only doing a 1d blur. Could I have you do a different screenshot so I don't have to make any significant (and untested) edits to my code?
  39. # [00:53] <dbaron> tabatkins, 1d?
  40. # [00:53] <tabatkins> As opposed to a 2d blur.
  41. # [00:54] <tabatkins> With gaussians it doesn't matter which one you test, since a 2d gaussian is just two 1d gaussians run in series.
  42. # [00:54] <dbaron> ah, ok, so I'll send you a screenshot of http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0Ap%20%7B%0Aheight%3A%201000px%3B%0Awidth%3A%20100px%3B%0A-moz-box-shadow%3A%2050px%2050px%20100px%20black%3B%0A%7D%0A%0A%3C%2Fstyle%3E%0A%3Cp%3E
  43. # [00:54] <dbaron> once I fix this
  44. # [00:55] <tabatkins> Yeah, that's perfect.
  45. # [00:56] <dbaron> ok, so now I have one change to our canvas code, one change to our box-shadow/text-shadow code, and one change to the graphics library that both use
  46. # [00:56] <tabatkins> Awesome.
  47. # [00:56] <dbaron> I'd like to try to multiply this out to see what the changes are.
  48. # [01:03] * Joins: anne (annevk@83.85.115.123)
  49. # [01:04] <dbaron> actually, I think I really want http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0Ap%20%7B%0Aheight%3A%201000px%3B%0Awidth%3A%20100px%3B%0A-moz-box-shadow%3A%2050px%20100px%20100px%20black%3B%0A%7D%0A%0A%3C%2Fstyle%3E%0A%3Cp%3E
  50. # [01:04] <dbaron> and maybe that 3/2 was ok, though
  51. # [01:04] <dbaron> but maybe not
  52. # [01:04] <tabatkins> Yeah, that's fine, since it shows the whole thing.
  53. # [01:04] <tabatkins> Do you want me to quickly produce a "correct" rendering for you in canvas?
  54. # [01:05] <tabatkins> Well, actually, you can do that yourself - www.xanthir.com/etc/blurplay
  55. # [01:05] <tabatkins> Just feed it a sigma and it shows you the gaussian, with red bars marking where the 2% point is hit on either side.
  56. # [01:08] <dbaron> tabatkins, btw, the example in the spec could really use some |<----->| showing where the spread radius and blur radius are
  57. # [01:09] <dbaron> in particular, it would help to know whether the band marked "Blur radius applied" is width blur-radius or width 2*blur-radius
  58. # [01:12] <tabatkins> ok
  59. # [01:12] <tabatkins> (brad made those diagrams)
  60. # [01:20] <dbaron> Anyway, I think the summary of my changes to follow the various formulae means that:
  61. # [01:20] <dbaron> * canvas blurs 8px or smaller will shrink by 0.667
  62. # [01:20] <dbaron> * canvas blurs larger than 8px will shrink by 0.943
  63. # [01:20] <dbaron> * text-shadow and box-shadow blurs will shrink by 0.940
  64. # [01:25] * Quits: anne (annevk@83.85.115.123) (Quit: anne)
  65. # [01:37] <dbaron> tabatkins, based on your simulation I think Mozilla's shadows are too small by at least a factor of 2
  66. # [01:38] <tabatkins> Remember, my page takes a sigma, not a blur radius.
  67. # [01:39] <dbaron> tabatkins, yeah, I divided the blur radius by 2
  68. # [01:39] <tabatkins> K, cool.
  69. # [01:39] <dbaron> tabatkins, but it looks like I need to divide it by 4 to get an equivalent
  70. # [01:39] <tabatkins> Huh. You've got some really weird input value, then.
  71. # [01:40] <dbaron> tabatkins, I'm using a blur radius of 100
  72. # [01:40] <dbaron> which looks like a sigma of 25 in your demo
  73. # [01:40] <tabatkins> I meant that whatever you plug your numbers into accepts some weird value.
  74. # [01:43] <tabatkins> I know that CG just takes a sigma. I think that Skia does too, though its blur isn't very close to a gaussian.
  75. # [01:43] <dbaron> we have a handwritten box blur impl
  76. # [02:16] <dbaron> tabatkins, ok, I got all my numbers wrong
  77. # [02:16] <dbaron> tabatkins, I'm actually increasing the size of Gecko's shadows
  78. # [02:16] <dbaron> er,
  79. # [02:16] <dbaron> * canvas blurs larger than 8px will stay the same
  80. # [02:17] <dbaron> * canvas blurs larger than 8px will grow by 1.414
  81. # [02:17] <dbaron> * text-shadow and box-shadow blurs will shrink by 0.940
  82. # [02:17] <dbaron> so actually shrinking shadows still
  83. # [02:19] <tabatkins> Okay. I don't recall exactly how your shadows were before, so as long as they match the parameters in the spec, I'm happy.
  84. # [02:40] <dbaron> er, and that first "larger" should have said "smaller"
  85. # [02:40] <tabatkins> Yeah, got that.
  86. # [02:40] <tabatkins> Do you really have a "3/2" in c++ code?
  87. # [02:41] <dbaron> yes, there really was
  88. # [02:41] <tabatkins> Classy.
  89. # [02:41] <dbaron> and it really didn't do anything
  90. # [02:41] <tabatkins> Well, yeah.
  91. # [02:48] * Joins: miketaylr (miketaylr@24.42.95.108)
  92. # [03:02] * Joins: boblet (boblet@220.105.162.103)
  93. # [03:39] * Quits: miketaylr (miketaylr@24.42.95.108) (Quit: Leaving...)
  94. # [04:11] * Joins: nimbupani (nimbupani@24.22.131.46)
  95. # [04:18] * Joins: miketaylr (miketaylr@24.42.95.108)
  96. # [04:23] * Quits: miketaylr (miketaylr@24.42.95.108) (Quit: Leaving...)
  97. # [04:45] * Joins: miketaylr (miketaylr@24.42.95.108)
  98. # [05:37] * Quits: miketaylr (miketaylr@24.42.95.108) (Quit: Leaving...)
  99. # [06:05] * Quits: dbaron (dbaron@63.245.220.240) (Quit: 8403864 bytes have been tenured, next gc will be global.)
  100. # [06:14] * Quits: szilles (chatzilla@24.6.121.94) (Quit: ChatZilla 0.9.86 [Firefox 3.6.8/20100722155716])
  101. # [06:33] * Joins: kennyluck (kennyluck@133.27.228.171)
  102. # [06:47] * Joins: dbaron (dbaron@98.234.51.190)
  103. # [08:21] * Quits: dbaron (dbaron@98.234.51.190) (Quit: 8403864 bytes have been tenured, next gc will be global.)
  104. # [08:49] * Quits: boblet (boblet@220.105.162.103) (Ping timeout)
  105. # [09:03] * Quits: nimbupani (nimbupani@24.22.131.46) (Quit: nimbupani)
  106. # [10:32] * Joins: anne (annevk@83.85.115.123)
  107. # [10:56] * Quits: jdaggett (jdaggett@202.221.217.73) (Quit: jdaggett)
  108. # [11:02] * Quits: arronei (arronei@131.107.0.98) (Ping timeout)
  109. # [11:07] * Joins: arronei (arronei@131.107.0.84)
  110. # [12:07] * Quits: kennyluck (kennyluck@133.27.228.171) (Quit: kennyluck)
  111. # [12:27] * Joins: kennyluck (kennyluck@133.27.175.117)
  112. # [13:19] <oyvind> I forget, is there an ED of 2.1?
  113. # [13:20] <anne> yes, but not public :/
  114. # [13:21] <anne> oyvind, you should be able to access it though: http://www.w3.org/Style/Group/css2-src/cover.html
  115. # [13:30] <oyvind> thanks
  116. # [14:37] * Quits: oyvind (oyvinds@213.236.208.22) (Client exited)
  117. # [14:39] * Joins: oyvind (oyvinds@213.236.208.22)
  118. # [14:50] * Joins: boblet (boblet@220.105.162.103)
  119. # [15:14] * Quits: kennyluck (kennyluck@133.27.175.117) (Quit: kennyluck)
  120. # [15:27] * Joins: kennyluck (kennyluck@133.27.228.169)
  121. # [15:58] * Joins: ChrisL (ChrisL@128.30.52.169)
  122. # [16:33] * Joins: dbaron (dbaron@98.234.51.190)
  123. # [16:42] * Joins: nimbupani (nimbupani@24.22.131.46)
  124. # [16:56] <dbaron> tabatkins, yesterday, we were comparing the wrong testcase. I think the right thing to compare is what I describe in http://dbaron.org/css/test/2010/shadow-blur, which I do match now that I've changed the numbers again :-)
  125. # [17:30] * Joins: miketaylr (miketaylr@24.42.95.108)
  126. # [17:34] * Quits: ChrisL (ChrisL@128.30.52.169) (Quit: Fire on main board error, client combusted)
  127. # [18:13] * Quits: boblet (boblet@220.105.162.103) (Quit: boblet)
  128. # [18:40] * Quits: miketaylr (miketaylr@24.42.95.108) (Ping timeout)
  129. # [18:41] * Joins: miketaylr (miketaylr@24.42.95.108)
  130. # [18:48] * Quits: miketaylr (miketaylr@24.42.95.108) (Client exited)
  131. # [19:46] * Quits: dbaron (dbaron@98.234.51.190) (Quit: 8403864 bytes have been tenured, next gc will be global.)
  132. # [20:09] * Joins: dbaron (dbaron@63.245.220.240)
  133. # [21:55] * Quits: nimbupani (nimbupani@24.22.131.46) (Quit: nimbupani)
  134. # [22:54] * Quits: anne (annevk@83.85.115.123) (Quit: anne)
  135. # Session Close: Sat Sep 11 00:00:00 2010

The end :)