Update new blurrect_compare GM to skip when SkCanvas::makeSurface will fail
Change-Id: I6e101bf54e233345934e258dadb4fb7ab3283b61 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/240511 Commit-Queue: Robert Phillips <robertphillips@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
a8f43ce668
commit
78be3ebee7
@ -251,7 +251,11 @@ protected:
|
||||
|
||||
void onOnceBeforeDraw() override { this->prepareReferenceMasks(); }
|
||||
|
||||
void onDraw(SkCanvas* canvas) override {
|
||||
DrawResult onDraw(SkCanvas* canvas, SkString* errorMsg) override {
|
||||
if (canvas->imageInfo().colorType() == kUnknown_SkColorType) {
|
||||
*errorMsg = "Not supported when recording, relies on canvas->makeSurface()";
|
||||
return DrawResult::kSkip;
|
||||
}
|
||||
int32_t ctxID = canvas->getGrContext() ? canvas->getGrContext()->priv().contextID() : 0;
|
||||
if (fRecalcMasksForAnimation || !fActualMasks[0][0][0] || ctxID != fLastContextUniqueID) {
|
||||
if (fRecalcMasksForAnimation) {
|
||||
@ -316,6 +320,7 @@ protected:
|
||||
canvas->restore();
|
||||
canvas->translate(totalW + 2 * kMargin, 0);
|
||||
}
|
||||
return DrawResult::kOk;
|
||||
}
|
||||
bool onAnimate(double nanos) override {
|
||||
fSigmaAnimationBoost = TimeUtils::SineWave(nanos, 5, 2.5f, 0.f, 2.f);
|
||||
|
Loading…
Reference in New Issue
Block a user