mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-27 01:00:50 +00:00
!11393 修复创建surface后未判空导致的空指针问题
Merge pull request !11393 from Liu Yongwei/dev_0523
This commit is contained in:
commit
c52a8c510e
@ -240,6 +240,10 @@ void RSFilterCacheManager::GenerateFilteredSnapshot(
|
||||
// Create an offscreen canvas with the same size as the filter region.
|
||||
auto offscreenRect = dstRect;
|
||||
auto offscreenSurface = surface->MakeSurface(offscreenRect.GetWidth(), offscreenRect.GetHeight());
|
||||
if (offscreenSurface == nullptr) {
|
||||
RS_LOGD("RSFilterCacheManager::GenerateFilteredSnapshot offscreenSurface is nullptr");
|
||||
return;
|
||||
}
|
||||
RSPaintFilterCanvas offscreenCanvas(offscreenSurface.get());
|
||||
|
||||
// Src rect and dst rect, with origin at (0, 0).
|
||||
|
Loading…
Reference in New Issue
Block a user