Chromium Code Reviews| Index: tests/RecordReplaceDrawTest.cpp |
| diff --git a/tests/RecordReplaceDrawTest.cpp b/tests/RecordReplaceDrawTest.cpp |
| index 9e1314795421c28815a82d0ea47a44b71bd7812d..d5cea0d141f71bde6935b2b31a6ac002f6febbb6 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; |
|
robertphillips
2016/06/23 19:14:07
texture ?
|
| + // Giving the texutre 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); |
| } |