Closed
Bug 1386966
Opened 7 years ago
Closed 7 years ago
Investigate coalescing flushes
Categories
(Core :: Graphics: Layers, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla57
Tracking | Status | |
---|---|---|
firefox57 | --- | fixed |
People
(Reporter: dvander, Assigned: mchang)
References
Details
Attachments
(1 file)
6.73 KB,
patch
|
dvander
:
review+
|
Details | Diff | Splinter Review |
Right now we gather drawing commands per-quadrant, send them to the paint thread, and continue on to the next quadrant. This means we could flush four times on the paint thread. We should do a quick measurement to see if that matters, and if so, see if it's possible to coalesce the flushes somehow.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → mchang
Assignee | ||
Comment 1•7 years ago
|
||
Coalesce DrawTarget flushes. We do this by storing which unique DTs get an Async paint call. Then the ClientPaintedLayer tosses a new event on the event loop, so it should come AFTER all the async paints, which we then flush the DTs. This should be sequentially consistent since the main thread paints one layer at a time and we call flush DTs after the layer has finished recording.
Attachment #8893979 -
Flags: review?(dvander)
Reporter | ||
Comment 2•7 years ago
|
||
Comment on attachment 8893979 [details] [diff] [review] Coalesce DT Flushes This doesn't quite work because BeginAsyncPaint and EndAsyncPaint are now imbalanced. BeginAsyncPaint is called before every region we draw, but EndAsyncPaint is always called at the end. Thus mOutstandingAsyncPaints in CompositorBridgeChild might never be zero [1]. I think the fix is to call BeginAsyncPaint once per layer, which shouldn't be difficult. r+ing assuming that pans out. [1] http://searchfox.org/mozilla-central/source/gfx/layers/PaintThread.cpp#165
Attachment #8893979 -
Flags: review?(dvander) → review+
Assignee | ||
Comment 3•7 years ago
|
||
(In reply to David Anderson [:dvander] (PTO 8/7 to 8/25, not reviewing) from comment #2) > Comment on attachment 8893979 [details] [diff] [review] > Coalesce DT Flushes > > This doesn't quite work because BeginAsyncPaint and EndAsyncPaint are now > imbalanced. BeginAsyncPaint is called before every region we draw, but > EndAsyncPaint is always called at the end. Thus mOutstandingAsyncPaints in > CompositorBridgeChild might never be zero [1]. > > I think the fix is to call BeginAsyncPaint once per layer, which shouldn't > be difficult. r+ing assuming that pans out. > > [1] > http://searchfox.org/mozilla-central/source/gfx/layers/PaintThread.cpp#165 BeginAsyncPaint is still called before every region we draw. EndAsyncPaint is also still always called at the end during AutoCapturedPaint destructor, so that's still balanced. We just took out the part about flushing when mOutstandingAsyncPaints = 0 [1] [1] http://searchfox.org/mozilla-central/source/gfx/layers/ipc/CompositorBridgeChild.cpp#1160
Assignee | ||
Comment 4•7 years ago
|
||
Try - https://treeherder.mozilla.org/#/jobs?repo=try&revision=428d3b4aa8e883ba93922baebb62d47e5eaec731
Pushed by mchang@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/c038cbe88566 Coalesce OMTP drawtarget flushes until finished painting a layer. r=dvander
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c038cbe88566
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in
before you can comment on or make changes to this bug.
Description
•