fix makeshared

Signed-off-by: huangzejia1 <huangzejia1@huawei.com>
Change-Id: I34904b081d99eb347b2fa7021c592467bc7f0869
This commit is contained in:
huangzejia1 2023-05-17 10:05:48 +08:00
parent 38ef78ceca
commit 301bc3096f

View File

@ -88,7 +88,7 @@ HWTEST_F(ImageTest, BuildFromPicture001, TestSize.Level1)
Matrix matrix;
Brush brush;
BitDepth bitDepth = BitDepth::KU8;
std::shared_ptr<ColorSpace> colorSpace(new ColorSpace(ColorSpace::ColorSpaceType::NO_TYPE));
auto colorSpace = std::make_shared<ColorSpace>(ColorSpace::ColorSpaceType::NO_TYPE);
image->BuildFromPicture(picture, dimensions, matrix, brush, bitDepth, colorSpace);
}
@ -302,7 +302,7 @@ HWTEST_F(ImageTest, BuildFromTextureTest001, TestSize.Level1)
TextureInfo info;
info.SetWidth(10);
BitmapFormat bitmapFormat { COLORTYPE_RGBA_8888, ALPHATYPE_OPAQUE };
std::shared_ptr<ColorSpace> colorSpace(new ColorSpace(ColorSpace::ColorSpaceType::NO_TYPE));
auto colorSpace = std::make_shared<ColorSpace>(ColorSpace::ColorSpaceType::NO_TYPE);
std::unique_ptr<Image> image = std::make_unique<Image>();
ASSERT_TRUE(image != nullptr);
image->BuildFromTexture(gpuContext, info, TextureOrigin::TOP_LEFT, bitmapFormat, colorSpace);