Merge "In CanvasContext check at start of frame if GrContext is abandoned." into sc-dev am: 303a9d787c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14129556 Change-Id: Ic0907c99d914b402cdf038e0b77c0c65217134ec
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