Merge "In CanvasContext check at start of frame if GrContext is abandoned." into sc-dev

This commit is contained in:
Greg Daniel
2021-04-09 13:23:29 +00:00
committed by Android (Google) Code Review

View File

@@ -452,6 +452,12 @@ void CanvasContext::notifyFramePending() {
}
void CanvasContext::draw() {
if (auto grContext = getGrContext()) {
if (grContext->abandoned()) {
LOG_ALWAYS_FATAL("GrContext is abandoned/device lost at start of CanvasContext::draw");
return;
}
}
SkRect dirty;
mDamageAccumulator.finish(&dirty);