Closed Bug 987054 Opened 11 years ago Closed 11 years ago

Skia Canvas leak

Categories

(Core :: Graphics, defect)

x86_64
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: jruderman, Assigned: gw280)

References

Details

(Keywords: memory-leak, regression, testcase)

Attachments

(2 files)

Attached file testcase
1. Set: user_pref("gfx.canvas.azure.backends", "skia"); 2. Run a debug build with XPCOM_MEM_LEAK_LOG=2 3. Load the testcase 4. Quit >== BloatView: ALL (cumulative) LEAK STATISTICS, default process 3643 > > |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->| > Per-Inst Leaked Total Rem Mean StdDev Total Rem Mean StdDev > 0 TOTAL 40 288 535813 4 ( 5500.67 +/- 8438.68) 1213051 7 ( 3796.25 +/- 6964.68) > 101 DataSourceSurfaceSkia 120 120 1 1 ( 1.00 +/- 0.00) 8 2 ( 2.50 +/- 0.94) > 102 DataSourceSurfaceWrapper 24 48 3 2 ( 1.00 +/- 0.82) 6 2 ( 1.50 +/- 0.85) > 118 DrawTargetSkia 120 120 1 1 ( 1.00 +/- 0.00) 9 3 ( 2.27 +/- 1.28) Seems to be a regression from about 2 days ago.
Assignee: nobody → milan
We need to do this on our automation.
Perhaps caused by the Skia update?
George, let's verify if this is from Skia update, if so, please fix "in a day" or back it out.
Assignee: milan → gwright
Flags: needinfo?(gwright)
Investigating today.
Flags: needinfo?(gwright)
I don't know how much the fix to bug 985773 changes the timing of destruction, but it may be worth taking the patch when testing this? Probably wouldn't make any difference...
(In reply to Milan Sreckovic [:milan] from comment #5) > I don't know how much the fix to bug 985773 changes the timing of > destruction, but it may be worth taking the patch when testing this? > Probably wouldn't make any difference... I don't think it'll matter because this isn't accelerated canvas, and that only affects GL-backed stuff, but I will check anyway.
It looks like what's happening here is that CopyableCanvasLayer is creating a wrapping gfxImageSurface on the DrawTarget snapshot, but in the case where width|height > 32768, cairo refuses to create it, and the gfxASurface is marked invalid. This means that the DrawTarget is still manually reffed in gfxPlatform.cpp:933, but the balancing deref from the SetData is never called, as SetData bails early as the gfxASurface is invalid. Not sure what the best thing to do here is to handle the failure of creation, but we definitely should be checking CairoStatus() to error out. Opinions, Matt?
Attachment #8396875 - Flags: review?(matt.woodrow)
Attachment #8396875 - Flags: review?(matt.woodrow) → review+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: