We need performance tests for image decoding. However, it seems hard to measure image decoding time because images are decoded only when they actually need to be painted. How can we wait until all the images are actually painted in a PerfTest case?
Some people felt the necessary in 2009. http://trac.webkit.org/wiki/QtWebKit/CodeCamp200912 I quote "Presentation on how to support JavaScript programmers to see what is going on. Currently a JavaScript API to expose information about painting is exposed. This API is similiar to the Mozilla mozAfterPaint Event. This way a JavaScript developer can see which content will be redrawn due his code. Another thing is to export the FPS count for drawing to the JavaScript developer. This somehow relates to the WebTime effort of the W3C. In the future we will need a heap profiler that will show the heap usage for each callframe of the JavaScript execution and finally we need the ability to do this on the device and get the data on the host." However, I think there had not been any progress yet because I can not find the relevant code in the upstream WebKit. WebKitAfterPaintEvent seems the solution to measure image decoding time.
(In reply to comment #1) > WebKitAfterPaintEvent seems the solution to measure image decoding time. Okay. We can add an event that is similar to MozAfterPaint. I think both layout tests and performance tests can use it. Are there other private events used only for tests in WebKit? If so, we can start from there.
(In reply to comment #2) > (In reply to comment #1) > > WebKitAfterPaintEvent seems the solution to measure image decoding time. > > Okay. We can add an event that is similar to MozAfterPaint. I think both layout tests and performance tests can use it. > > Are there other private events used only for tests in WebKit? If so, we can start from there. I'm not sure if that's a good idea... I'd prefer recording fps instead. Also, measuring paint performance from DRT is kind of bogus because it never paints to screen.
(In reply to comment #3) > I'm not sure if that's a good idea... I'd prefer recording fps instead. Also, measuring paint performance from DRT is kind of bogus because it never paints to screen. Because decoded images are cached, we can't measure image decoding time with FPS. Or we need an API to clear all decoded image caches.