提交 44c53646 编写于 作者: P pssea

Description:fix animation crash when animation mapbuffer is not enabled

IssueNo: https://gitee.com/openharmony/graphic_ui/issues/I43KNZ
Feature or Bugfix: Feature
Binary Source:No
Signed-off-by: Nlizhiqi <lizhiqi1@huawei.com>
上级 0ab1f949
......@@ -449,6 +449,9 @@ void DrawUtils::FillAreaWithSoftWare(BufferInfo& gfxDstBuffer,
const ColorType& color,
const OpacityType& opa) const
{
if (gfxDstBuffer.virAddr == nullptr) {
return;
}
ColorMode mode = gfxDstBuffer.mode;
uint8_t destByteSize = GetByteSizeByColorMode(mode);
int16_t destWidth = gfxDstBuffer.width;
......@@ -545,6 +548,9 @@ void DrawUtils::BlendWithSoftWare(const uint8_t* src1,
uint32_t x,
uint32_t y) const
{
if ((dst == nullptr) || (src1 == nullptr)) {
return;
}
uint8_t destByteSize = GetByteSizeByColorMode(destMode);
uint8_t srcByteSize = GetByteSizeByColorMode(srcMode);
......@@ -1672,6 +1678,9 @@ void DrawUtils::DrawTransform(BufferInfo& gfxDstBuffer,
if (opaScale == OPA_TRANSPARENT) {
return;
}
if ((gfxDstBuffer.virAddr == nullptr) || (dataInfo.data == nullptr)) {
return;
}
TransformDataInfo newDataInfo = dataInfo;
TransformMap newTransMap = transMap;
// If the width and height of the rectangle of transMap are not equal to the width and height of the ImageHeader,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册