!17386 fuzz用例整改

Merge pull request !17386 from porridge783/branch04
This commit is contained in:
openharmony_ci 2024-11-22 12:50:04 +00:00 committed by Gitee
commit 69c7ba2930
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 8 additions and 4 deletions

View File

@ -100,8 +100,8 @@ std::shared_ptr<Drawing::Image> ScaleAndAddRandomColorFuzzTest(const uint8_t *da
Drawing::Rect src = GETest::GetPlainData<Drawing::Rect>();
Drawing::Rect dst = GETest::GetPlainData<Drawing::Rect>();
auto width = std::max(static_cast<int>(std::ceil(dst.GetWidth())), imageBlur->GetWidth());
auto height = std::max(static_cast<int>(std::ceil(dst.GetHeight())), imageBlur->GetHeight());
int width = GETest::GetPlainData<int>();
int height = GETest::GetPlainData<int>();
auto res = shaderFilter->ScaleAndAddRandomColor(canvas, image, imageBlur, src, dst, width, height);
return res;

View File

@ -70,8 +70,8 @@ std::shared_ptr<Drawing::Image> ScaleAndAddRandomColorFuzzTest(const uint8_t *da
Drawing::Rect src = GETest::GetPlainData<Drawing::Rect>();
Drawing::Rect dst = GETest::GetPlainData<Drawing::Rect>();
auto width = std::max(static_cast<int>(std::ceil(dst.GetWidth())), imageBlur->GetWidth());
auto height = std::max(static_cast<int>(std::ceil(dst.GetHeight())), imageBlur->GetHeight());
int width = GETest::GetPlainData<int>();
int height = GETest::GetPlainData<int>();
Drawing::Canvas canvas;
auto res = shaderFilter->ScaleAndAddRandomColor(canvas, image, imageBlur, src, dst, width, height);

View File

@ -62,6 +62,10 @@ std::shared_ptr<Drawing::Image> GERenderFuzzTest002(const uint8_t *data, size_t
return nullptr;
}
// initialize
GETest::g_data = data;
GETest::g_size = size;
GETest::g_pos = 0;
auto geRender = std::make_shared<GERender>();
Drawing::Canvas canvas;
auto visualEffect = std::make_shared<Drawing::GEVisualEffect>(Drawing::GE_FILTER_KAWASE_BLUR);