Do not make an extra submit callback during SurfaceFrame destruction if the frame was already submitted (#5669)

This commit is contained in:
Jason Simmons 2018-07-03 17:17:57 -07:00 committed by GitHub
parent b663010558
commit d085f1df2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ SurfaceFrame::SurfaceFrame(sk_sp<SkSurface> surface,
}
SurfaceFrame::~SurfaceFrame() {
if (submit_callback_) {
if (submit_callback_ && !submitted_) {
// Dropping without a Submit.
submit_callback_(*this, nullptr);
}