Last Comment Bug 724928 - We could tell Gecko to draw less to improve checkerboarding
: We could tell Gecko to draw less to improve checkerboarding
Status: RESOLVED FIXED
:
Product: Firefox for Android
Classification: Client Software
Component: General (show other bugs)
: Trunk
: ARM Android
: -- normal (vote)
: Firefox 13
Assigned To: Chris Lord [:cwiiis]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-07 07:57 PST by Chris Lord [:cwiiis]
Modified: 2012-02-10 05:06 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Try not to draw areas we have no interest in (13.57 KB, patch)
2012-02-08 03:11 PST, Chris Lord [:cwiiis]
bugmail: review+
Details | Diff | Splinter Review
Try not to draw areas we have no interest in (14.39 KB, patch)
2012-02-09 08:32 PST, Chris Lord [:cwiiis]
bugmail: review+
Details | Diff | Splinter Review

Description Chris Lord [:cwiiis] 2012-02-07 07:57:58 PST
Between the time Gecko has processed the viewport we've sent and it's ready to draw, there is often an amount of the layer that we will end up ignoring. We could tell Gecko not to draw this region and save on some drawing time - this ought to improve checkerboarding slightly (but not dramatically).
Comment 1 Chris Lord [:cwiiis] 2012-02-08 03:11:09 PST
Created attachment 595364 [details] [diff] [review]
Try not to draw areas we have no interest in

Sorry for the delay, I had the patch finished yesterday but I wanted to hold off until it was a provable improvement. Ends up it was a good idea to hold off, as testing found a bug that I'd missed.

This patch alters beginDrawing so that it can return a rectangle of the buffer that it's interested in. Gecko then uses this to clip the dirty region, which often saves on unnecessary drawing during flings.

Using testCheck with the patch from bug 725255, and an offline copy of engadget.com, before this patch I get an average completeness of 0.26675224, and after, 0.35861328 - an improvement of approximately 34% (note though, that this value is not as good as it sounds, as these are both pretty low numbers).
Comment 2 Kartikaya Gupta (email:kats@mozilla.com) 2012-02-08 05:22:31 PST
Comment on attachment 595364 [details] [diff] [review]
Try not to draw areas we have no interest in

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

The calculation of the ideal and actual displayport could use a little more commenting; it's a little hard too follow math like that. But the patch looks good.
Comment 3 Chris Lord [:cwiiis] 2012-02-09 08:32:16 PST
Created attachment 595761 [details] [diff] [review]
Try not to draw areas we have no interest in

After running with it for a night, I noticed a problem that this change ought to fix... I'm not sure if it's worth committing this at all if all the code is going to disappear soon anyway, but I'm updating this patch for completeness sake.

kats, feel free not to review this if it'd take time from more important things. I just couldn't live with myself knowing that this patch had a problem that was easily fixed :)
Comment 4 Kartikaya Gupta (email:kats@mozilla.com) 2012-02-09 09:11:19 PST
Comment on attachment 595761 [details] [diff] [review]
Try not to draw areas we have no interest in

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

Looks good
Comment 5 Ed Morley [:emorley] 2012-02-10 05:06:44 PST
https://hg.mozilla.org/mozilla-central/rev/1a01259eb5c8

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