Closed Bug 1900677 Opened 2 years ago Closed 2 years ago

Add a capability to recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible

Categories

(Core :: Graphics: Canvas2D, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 external file)

Blocks: 1899231
Summary: Add a capability to recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() → Add recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible
Summary: Add recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible → Recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible

With default gecko, Firefox profiler with canvas2dvideo.

Both on Linux and on MacOS, 100% CPU was used on CanvasRenderer thread.

https://treeherder.mozilla.org/jobs?repo=try&selectedTaskRun=a8jLSE-DTp-5_Kkldq9nxw.0&revision=779c6bdf96bdc20abbeca35c76c9ef6c9b65c8fb

deleted

Attachment #9405579 - Attachment description: WIP: Bug 1900677 - Recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible → Bug 1900677 - Recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible
Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/23623797fb75 Recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible r=gfx-reviewers,lsalzman

Backed out for causing mediasource related wpt failures

Backout link

Push with failures

Failure log

Flags: needinfo?(sotaro.ikeda.g)

Hmm, timing change seemed to cause the problem.

Flags: needinfo?(sotaro.ikeda.g)
Summary: Recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible → Add a capability to recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible

Going to disable the recycling by pref for now.

Attachment #9405579 - Attachment description: Bug 1900677 - Recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible → Bug 1900677 - Add a capability to recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible
Pushed by sikeda.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/eee43724710b Add a capability to recycle DataSourceSurface allocated in CanvasTranslator::LookupSourceSurfaceFromSurfaceDescriptor() if possible r=gfx-reviewers,lsalzman
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch

The problem of comment 6 happened because of SharedContextWebgl::DrawRectAccel() implementation.

When aForceUpdate is not set, recycled DataSourceSurface data is not uploaded to texture.

And DrawTargetWebgl::DrawSurface(). Does not request force update.

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

Attachment

General

Created:
Updated:
Size: