Closed
Bug 1379029
Opened 7 years ago
Closed 7 years ago
Implement GuaranteePersistance on SourceSurfaceD2D + SourceSurfaceSkia
Categories
(Core :: Graphics, enhancement)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: mchang, Assigned: mchang)
References
Details
Attachments
(1 file, 4 obsolete files)
1.18 KB,
patch
|
lsalzman
:
review+
|
Details | Diff | Splinter Review |
DrawTargetCapture requires source surfaces to stay alive until playback time. It does this by calling SourceSurface::GuaranteePersistance when recording a moz2d command that requires a SourceSurface[1]. What was happening with some source surfaces was that we'd create a temporary draw target (mostly skia), and we'd free the SourceSurface before we could replay the captured contents. This implements GuaranteePersistance by making copies of the source surface and being sad as we just made recording slower :(. [1] http://searchfox.org/mozilla-central/source/gfx/2d/DrawTargetCapture.cpp#88
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8884117 -
Flags: review?(lsalzman)
Comment on attachment 8884117 [details] [diff] [review] Implement GuaranteePersistance for SourceSurfaceSKia + SourceSurfaceD2D Review of attachment 8884117 [details] [diff] [review]: ----------------------------------------------------------------- ::: gfx/2d/SourceSurfaceSkia.cpp @@ +177,5 @@ > > +void > +SourceSurfaceSkia::GuaranteePersistance() > +{ > + // Explicitly make a copy of the image since sometimes, SourceSurfaceSkia Let's open a bug for this, maybe there is a way to transfer the ownership instead of always making a copy?
Comment 3•7 years ago
|
||
(In reply to Milan Sreckovic [:milan] from comment #2) > Comment on attachment 8884117 [details] [diff] [review] > Implement GuaranteePersistance for SourceSurfaceSKia + SourceSurfaceD2D > > Review of attachment 8884117 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: gfx/2d/SourceSurfaceSkia.cpp > @@ +177,5 @@ > > > > +void > > +SourceSurfaceSkia::GuaranteePersistance() > > +{ > > + // Explicitly make a copy of the image since sometimes, SourceSurfaceSkia > > Let's open a bug for this, maybe there is a way to transfer the ownership > instead of always making a copy? This shouldn't be necessary, as SourceSurfaceSkia, when used as a snapshot, contains a RefPtr to the owning DrawTargetSkia. And DrawTargetSkia::MarkChanged will take care of the snapshot being orphaned as well. So long as you're holding a RefPtr to the SourceSurfaceSkia, it should basically always be safe, in principle. Thus, I don't think this bug is what it seems. It would be nice to know more about the surrounding circumstances so we could ascertain what's going on.
Assignee | ||
Comment 4•7 years ago
|
||
Attachment #8884117 -
Attachment is obsolete: true
Attachment #8884117 -
Flags: review?(lsalzman)
Attachment #8884404 -
Flags: review?(lsalzman)
Assignee | ||
Comment 5•7 years ago
|
||
Attachment #8884404 -
Attachment is obsolete: true
Attachment #8884404 -
Flags: review?(lsalzman)
Attachment #8884407 -
Flags: review?(lsalzman)
Assignee | ||
Comment 6•7 years ago
|
||
Attachment #8884407 -
Attachment is obsolete: true
Attachment #8884407 -
Flags: review?(lsalzman)
Attachment #8884408 -
Flags: review?(lsalzman)
Assignee | ||
Comment 7•7 years ago
|
||
Attachment #8884408 -
Attachment is obsolete: true
Attachment #8884408 -
Flags: review?(lsalzman)
Attachment #8884410 -
Flags: review?(lsalzman)
Updated•7 years ago
|
Attachment #8884410 -
Flags: review?(lsalzman) → review+
Assignee | ||
Comment 8•7 years ago
|
||
Try - https://treeherder.mozilla.org/#/jobs?repo=try&revision=e89d3637216f1099457ad477cd77aa26232a4ab9
Pushed by mchang@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/e897b12b2b63 AddUserData to hold onto the calloc blur memory. r=lsalzman
Comment 10•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/e897b12b2b63
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•