Closed Bug 992486 Opened 6 years ago Closed 6 years ago

Paint multiple times to avoid unrotating buffers

Categories

(Core :: Graphics: Layers, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

References

Details

Attachments

(5 files, 2 obsolete files)

Allocating a new buffer and copying all the pixels to it when we need to unrotate the buffer is expensive. Instead we can just paint multiple times when the region to draw crosses the physical buffer boundary.
This basically just folds in PaintBuffer, removes an unnecessary scope and shuffles some things around to make multiple paints easier.
Attachment #8402183 - Flags: review?(roc)
Attachment #8402167 - Flags: review?(nical.bugzilla) → review+
Comment on attachment 8402166 [details] [diff] [review]
Part 1: Add API to RotatedContentBuffer (previously ThebesLayerBuffer) for drawing in multiple passes

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

This seems to be the wrong patch? It doesn't look like it adds API...
Sorry, don't know how that happened.
Attachment #8402166 - Attachment is obsolete: true
Attachment #8403716 - Flags: review?(roc)
Why do we care about buffer rotation at this point?  I thought everything was going to shift over to tiling. (And the things that don't, we shouldn't need to optimize scrolling for.)
We decided to not block windows OMTC on getting tiling enabled. Mainly because tiling actually performs worse than buffer rotation, unless we also add in APZC. That's a complicated dependency chain that results in us not being able to have any nice things until all the nice things are done.

It's easier just to fix some small pain points with buffer rotation (like this patch queue) so we can push forward with OMTC.

Having OMTC enabled will then let us work on tiling/APZC in parallel to other work, like async animations, async video etc.
Specifically Comment 7 and beyond.
D3D11 is a little bit broken without this
Assignee: nobody → matt.woodrow
Attachment #8404438 - Flags: review?(roc)
hey Matt, sorry had to backout this change since i guess it caused bustages like https://tbpl.mozilla.org/php/getParsedLog.php?id=37550177&tree=Mozilla-Inbound
If this patch was supposed to fix the graphics corruption it did not..

I just installed the latest hourly cset: 
https://hg.mozilla.org/mozilla-central/rev/83ae54e18689

Scrolling this very bug, once I reach near the end of page graphics corruptions destroys the page, scrolling up/down makes it worse.  A refresh will fix it for a bit.

Tested on win7 x64 bit m-i 32bit build.
Depends on: 994910
(In reply to Jim Jeffery not reading bug-mail 1/2/11 from comment #18)
> If this patch was supposed to fix the graphics corruption it did not..
> 
> I just installed the latest hourly cset: 
> https://hg.mozilla.org/mozilla-central/rev/83ae54e18689
> 
> Scrolling this very bug, once I reach near the end of page graphics
> corruptions destroys the page, scrolling up/down makes it worse.  A refresh
> will fix it for a bit.
> 
> Tested on win7 x64 bit m-i 32bit build.

Sorry, this was OMTC related, bug 994910 filed by Alice.
Part 5 hasn't been merged to m-c yet unfortunately. It should be fixed on m-i builds.
Depends on: 1135509
You need to log in before you can comment on or make changes to this bug.