In CanvasContext check at start of frame if GrContext is abandoned.
On Vulkan part of the abandoned check also checks for device lost. Following what we currently do in GL, we now crash if we are ever in this state. Test: local build Bug: 183722403 Change-Id: I2a41005fd6892e32a8b23dacbc0170d5542fe072
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user