| Index: tests/RecordReplaceDrawTest.cpp
|
| diff --git a/tests/RecordReplaceDrawTest.cpp b/tests/RecordReplaceDrawTest.cpp
|
| index 9e1314795421c28815a82d0ea47a44b71bd7812d..0dd804ec9d024e33c8f86a6d90b22c6e25e5951b 100644
|
| --- a/tests/RecordReplaceDrawTest.cpp
|
| +++ b/tests/RecordReplaceDrawTest.cpp
|
| @@ -124,8 +124,13 @@ void test_replacements(skiatest::Reporter* r, GrContext* context, bool doReplace
|
| desc.fHeight = kHeight;
|
| desc.fSampleCnt = 0;
|
|
|
| + // Giving the texture some initial data so the Gpu (specifically vulkan) does not complain
|
| + // when reading from an uninitialized texture.
|
| + SkAutoTMalloc<uint32_t> srcBuffer(kWidth*kHeight);
|
| + memset(srcBuffer.get(), 0, kWidth*kHeight*sizeof(uint32_t));
|
| +
|
| texture.reset(context->textureProvider()->createTexture(
|
| - desc, SkBudgeted::kNo, nullptr, 0));
|
| + desc, SkBudgeted::kNo, srcBuffer.get(), 0));
|
| layer->setTexture(texture, SkIRect::MakeWH(kWidth, kHeight), false);
|
| }
|
|
|
|
|