Closed Bug 1582624 Opened 5 years ago Closed 5 years ago

Add partial present API for webrender

Categories

(Core :: Graphics: WebRender, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: gw, Assigned: gw)

References

(Blocks 1 open bug)

Details

(Whiteboard: [wr-q41])

Attachments

(1 file, 1 obsolete file)

No description provided.

Add an API to RendererOptions that allows a client to enable
partial present mode, with a given maximum number of dirty
rects.

The Transaction API also has a new method, called
reset_partial_present. This method can be called when
the device is reset, or window resized etc to force a full
redraw of cached tiles.

When partial present is enabled, WR will only composite dirty
regions into the framebuffer, potentially improving GPU performance
and saving battery usage.

Assignee: nobody → gwatson

This is a hack / work-in-progress. It would need a better implementation before we consider merging it, but it might be good enough to start doing some experiments with to see if the basic API / concept is working correctly?

I just realized that this requires setting the reset_partial_present flag when creating a transaction, when you probably can only set it just before render()? That should be easy enough to handle in the proper implementation, if that's the case?

Blocks: 1575159

Yeah, Gecko will probably want to set this in render().

Yes, creating a transaction happens on compositor IPC thread. But render() is called on RenderThread.

Attachment #9094106 - Attachment is obsolete: true
Blocks: 1536360
Pushed by gwatson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/79e9381b90c8
Add partial present API for webrender. r=nical
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla71
Whiteboard: [wr-q41]
Regressions: 1587084
You need to log in before you can comment on or make changes to this bug.