回退冗余判断代码

Signed-off-by: lw19901203 <liuwei793@h-partners.com>
This commit is contained in:
lw19901203 2024-10-14 09:42:34 +08:00
parent de0270eebf
commit bef8565e4f

View File

@ -573,10 +573,6 @@ Drawing::RecordingCanvas::DrawFunc RSBackgroundEffectDrawable::CreateDrawFunc()
{
auto ptr = std::static_pointer_cast<const RSBackgroundEffectDrawable>(shared_from_this());
return [ptr](Drawing::Canvas* canvas, const Drawing::Rect* rect) {
if (canvas == nullptr || rect == nullptr) {
RS_LOGE("RSBackgroundEffectDrawable::DrawBackgroundEffect data error");
return;
}
auto paintFilterCanvas = static_cast<RSPaintFilterCanvas*>(canvas);
Drawing::AutoCanvasRestore acr(*canvas, true);
paintFilterCanvas->ClipRect(*rect);