Closed Bug 603885 Opened 14 years ago Closed 14 years ago

Fix bad cases caused by swap-and-invalidate (implement swap-and-readback)

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
fennec 2.0b3+ ---

People

(Reporter: cjones, Assigned: cjones)

References

()

Details

Attachments

(8 files)

6.89 KB, patch
roc
: review+
Details | Diff | Splinter Review
12.83 KB, patch
roc
: review+
Details | Diff | Splinter Review
2.56 KB, patch
joe
: review+
Details | Diff | Splinter Review
1.26 KB, patch
joe
: review+
Details | Diff | Splinter Review
4.17 KB, patch
roc
: review+
Details | Diff | Splinter Review
4.85 KB, patch
roc
: review+
Details | Diff | Splinter Review
5.07 KB, patch
roc
: review+
Details | Diff | Splinter Review
2.28 KB, patch
roc
: review+
Details | Diff | Splinter Review
STR
 (1) Load URL

Expected results can be seen in desktop FF: the page takes a looong time to load (initial paint), but afterwards the yellow box moves around at a constant rate.

Actual results: in fennec, the yellow box moves around quickly at first but thereafter at a decreasing rate.

This is a contrived example, but highlights the big flaw in swap-and-invalidate: successive invalidated regions have to accumulate.  It's pretty easy to hit this case on "real" sites: if one focuses an input field, pans around so as to force prefetch-region updates, then goes back to the input field, we end up invalidating the union of all previously invalidated regions.  This brings back the "character input slow" bug, because we're invalidating more than just the input field.  This also hurts our toroidal-buffer optimization which makes updating after scrolls more expensive.

The fix is to swap back/front then read back the updated region from new-front to new-back.  Toroidal buffers make this a bit more complicated, but it's not too bad.
This will be ready in time for b2, but blocking-bN is fine.
tracking-fennec: --- → ?
tracking-fennec: ? → 2.0b3+
Attachment #483398 - Flags: review?(joe) → review+
Attachment #483399 - Flags: review?(joe) → review+
Comment on attachment 483397 [details] [diff] [review]
part 2: Set up the framework for swap-and-readback

Do we use this Maybe convention elsewhere? Seems to me "Optional" would be clearer.
Attachment #483397 - Flags: review?(roc) → review+
We previously used it in PPluginInstance, but no longer.  "Optional" suits me fine.
Vlad: Review ping.
Comment on attachment 483397 [details] [diff] [review]
part 2: Set up the framework for swap-and-readback

Sorry, was traveling -- looks fine, but what's null_t() ?  If it's just nsnull, would prefer nsnull for the convention, but not very strongly.
Attachment #483397 - Flags: superreview?(vladimir) → superreview+
null_t is a type that means "nothing", nsnull is a value of type void*.  null_t can be used in IPDL union types but nsnull can't, because it's a value.
Status: NEW → ASSIGNED
Whiteboard: [fennec-checkin-postb2][has-patch]
Whiteboard: [fennec-checkin-postb2][has-patch]
Depends on: 610210
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: