Re: [chromium-dev] Interesting performance characteristics of http://a.qoid.us/google.html

2010-01-12 Thread Brett Wilson
On Mon, Jan 11, 2010 at 9:04 PM, Chris Evans cev...@chromium.org wrote:
 Hi,
 I found this interesting: http://a.qoid.us/google.html
 Because it's clearly very non-JavaScript focused (just a CSS rotation) and
 yet the browsers exhibit very different performance characteristics.
 All on my underpowered Windows laptop,
 Chrome 3  4: smooth. Very nice anti-aliased accurate rendering.
 Safari 4: not quite as smooth; less fps but still not bad. Text / lines more
 jagged and text wobbles during the rotation.
 The other browsers do not support the CSS used / required for this demo.
 There was a similar version, but using SVG animation to do something very
 similar. (It's currently offline). Firefox and Opera were able to attempt
 the rotation of this one but both performed much worse that Safari and
 Chrome.
 Anyone know why Chrome, and to a certain extent Safari, are so much better
 on this non-JS test? Is the Skia library underpinning Chrome superior?
 There's also a difference between Chrome Windows and Chrome Linux. Whilst
 Chrome Linux performs smoothly, the text is clearly jiggling around and even
 getting more / less bold throughout the rotation cycle. Doesn't do that on
 Windows. Any ideas?

I imagine the problems on Linux are the same as they were on Windows,
where the underlying graphics layer wants to place glyphs aligned on
pixel boundaries. This gives rounding problems and the letters jump
around. I spent several weeks making the rotations and transparency on
Windows text and form controls look good.

Brett
-- 
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev

Re: [chromium-dev] Interesting performance characteristics of http://a.qoid.us/google.html

2010-01-12 Thread Evan Martin
On Tue, Jan 12, 2010 at 10:17 AM, Brett Wilson bre...@chromium.org wrote:
 I imagine the problems on Linux are the same as they were on Windows,
 where the underlying graphics layer wants to place glyphs aligned on
 pixel boundaries. This gives rounding problems and the letters jump
 around. I spent several weeks making the rotations and transparency on
 Windows text and form controls look good.

Can you elaborate a bit on what you did?  (I write this as maybe the
person who will need to fight with this at some point, but practically
I wonder if it'll eventually fall on you.  :P)
-- 
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev

Re: [chromium-dev] Interesting performance characteristics of http://a.qoid.us/google.html

2010-01-12 Thread Brett Wilson
On Tue, Jan 12, 2010 at 11:33 AM, Evan Martin e...@chromium.org wrote:
 On Tue, Jan 12, 2010 at 10:17 AM, Brett Wilson bre...@chromium.org wrote:
 I imagine the problems on Linux are the same as they were on Windows,
 where the underlying graphics layer wants to place glyphs aligned on
 pixel boundaries. This gives rounding problems and the letters jump
 around. I spent several weeks making the rotations and transparency on
 Windows text and form controls look good.

 Can you elaborate a bit on what you did?  (I write this as maybe the
 person who will need to fight with this at some point, but practically
 I wonder if it'll eventually fall on you.  :P)

This is the code in SkiaFontWin.cpp. That's non-ideal, and it would be
better to have Skia get the outlines itself and use the Skia path. I
don't actually know where the rounding problems occur on Linux. Skia
should be fine with it, but its probably in the way it interacts with
FreeType (maybe a glyph cache that requires being pixel-aligned?)

Brett
-- 
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev

Re: [chromium-dev] Interesting performance characteristics of http://a.qoid.us/google.html

2010-01-11 Thread James Robinson
Chromium is spending nearly all of its time inside Skia, so it's likely Skia
vs CG differences:

Welcome to pprof!  For help, type 'help'.
(pprof) top
Total: 1590 samples
 592  37.2%  37.2%  592  37.2% SkRegion::Spanerator::Spanerator
  89   5.6%  42.8%   89   5.6% sk_memset32_SSE2
  87   5.5%  48.3%  135   8.5% TT_RunIns
  71   4.5%  52.8%   71   4.5% S32_opaque_D32_filter_DXDY
  58   3.6%  56.4%   58   3.6% SkAlphaRuns::Break
  52   3.3%  59.7%  996  62.6% walk_edges

- James


On Tue, Jan 12, 2010 at 1:38 AM, Eric Seidel esei...@chromium.org wrote:

 I've filed https://bugs.webkit.org/show_bug.cgi?id=33515

 On Mon, Jan 11, 2010 at 9:04 PM, Chris Evans cev...@chromium.org wrote:
  Hi,
  I found this interesting: http://a.qoid.us/google.html
  Because it's clearly very non-JavaScript focused (just a CSS rotation)
 and
  yet the browsers exhibit very different performance characteristics.
  All on my underpowered Windows laptop,
  Chrome 3  4: smooth. Very nice anti-aliased accurate rendering.
  Safari 4: not quite as smooth; less fps but still not bad. Text / lines
 more
  jagged and text wobbles during the rotation.
  The other browsers do not support the CSS used / required for this demo.
  There was a similar version, but using SVG animation to do something very
  similar. (It's currently offline). Firefox and Opera were able to attempt
  the rotation of this one but both performed much worse that Safari and
  Chrome.
  Anyone know why Chrome, and to a certain extent Safari, are so much
 better
  on this non-JS test? Is the Skia library underpinning Chrome superior?
  There's also a difference between Chrome Windows and Chrome Linux. Whilst
  Chrome Linux performs smoothly, the text is clearly jiggling around and
 even
  getting more / less bold throughout the rotation cycle. Doesn't do that
 on
  Windows. Any ideas?
 
  Cheers
  Chris
  --
  Chromium Developers mailing list: chromium-dev@googlegroups.com
  View archives, change email options, or unsubscribe:
 http://groups.google.com/group/chromium-dev
 

 --
 Chromium Developers mailing list: chromium-dev@googlegroups.com
 View archives, change email options, or unsubscribe:
http://groups.google.com/group/chromium-dev

-- 
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev

Re: [chromium-dev] Interesting performance characteristics of http://a.qoid.us/google.html

2010-01-11 Thread Chris Evans
On Mon, Jan 11, 2010 at 11:01 PM, Evan Martin e...@chromium.org wrote:

 On Mon, Jan 11, 2010 at 9:04 PM, Chris Evans cev...@chromium.org wrote:
  The other browsers do not support the CSS used / required for this demo.
  There was a similar version, but using SVG animation to do something very
  similar. (It's currently offline). Firefox and Opera were able to attempt
  the rotation of this one but both performed much worse that Safari and
  Chrome.
  Anyone know why Chrome, and to a certain extent Safari, are so much
 better
  on this non-JS test? Is the Skia library underpinning Chrome superior?

 I'm not certain, but it sounds like you're comparing CSS rotations in
 the Chrome/Safari case and SVG rotations in the other, so I'm not sure
 it's a fair comparison.  (Unless you mean to say Chrome/Safari were
 more performant for the SVG demo as well.)


Yes, that's what I meant. The SVG demo was pretty much the same: applying a
rotation transform to an iframe of www.google.com. It just happens to be
supported on more of the major browsers (everything except IE).

Cheers
Chris

Two anecdotal comments:
  - In my experience (on Linux) Firefox had really poor SVG
 performance, and that (for example) canvas performs a lot better.  I
 think none of the engines have done much work on SVG, in part because
 basically nobody uses it on the web except for demos like this.
  - Also in my experience Chrome+Skia tends to be faster but sometimes
 less smooth than Safari's CG.  See also all of Dean's Pre3d demos.

  There's also a difference between Chrome Windows and Chrome Linux. Whilst
  Chrome Linux performs smoothly, the text is clearly jiggling around and
 even
  getting more / less bold throughout the rotation cycle. Doesn't do that
 on
  Windows. Any ideas?

 I don't know much about how this rotation business works, but if I had
 to guess from looking at it I'd say hinting is getting involved.

-- 
Chromium Developers mailing list: chromium-dev@googlegroups.com 
View archives, change email options, or unsubscribe: 
http://groups.google.com/group/chromium-dev