SourceSurfaceCapture::IsValid does not validate its underlying surface
Categories
(Core :: Graphics, defect, P2)
Tracking
()
People
(Reporter: aosmond, Assigned: aosmond)
References
Details
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-release+
|
Details | Review |
SourceSurfaceCapture::IsValid does not call IsValid on mResolved/mSurfToOptimize to verify they are still valid. When you use D2D drawing with OMTP, this means that a device reset can invalidate mResolved/mSurfToOptimize, but the parent surface claims it is still valid. This causes us to fail silently inside DrawTargetD2D1::FillRect/etc and images (or any captured D2D surface really) will never paint until the cache is evicted.
Assignee | ||
Comment 1•4 years ago
|
||
SourceSurfaceCapture can contain an underlying surface instead of a set
of drawing commands. The surface has its own valid state, and must be
checked by the parent in SourceSurfaceCapture::IsValid. If we don't,
then we may end up failing silently while drawing, and images will go
missing. The underlying surface can be invalidated by a device reset if
it is a SourceSurfaceD2D1, as an example.
Pushed by aosmond@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1343555236b2 SourceSurfaceCapture::IsValid should validate any underlying surfaces. r=jrmuizel
Comment 3•4 years ago
|
||
bugherder |
Assignee | ||
Comment 4•4 years ago
|
||
Comment on attachment 9123559 [details]
Bug 1612207 - SourceSurfaceCapture::IsValid should validate any underlying surfaces.
Beta/Release Uplift Approval Request
- User impact if declined: Images may go missing if the underlying surface becomes invalid (e.g. device reset on Windows).
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): The change is very small. The logic flow change is a very well exercised / tested code path.
- String changes made/needed:
Comment 5•4 years ago
|
||
Comment on attachment 9123559 [details]
Bug 1612207 - SourceSurfaceCapture::IsValid should validate any underlying surfaces.
Small fix which may help avoid images going missing in some cases. Approved for 73.0RC1.
Comment 6•4 years ago
|
||
bugherder uplift |
Description
•