Commit 9d1ad1fd authored by Khushal's avatar Khushal Committed by Commit Bot

oop: Fix uninitialized memory use in OopPixelTest.

We were not initializing the position buffer for a text run.

TBR=enne@chromium.org

Bug: 829622
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Ie64d63b18431198d12abc70a091ce2e24ea0d4d0
Reviewed-on: https://chromium-review.googlesource.com/1041656
Commit-Queue: Khushal <khushalsagar@chromium.org>
Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555676}
parent 1f3a2f04
...@@ -1083,8 +1083,10 @@ scoped_refptr<PaintTextBlob> buildTextBlob() { ...@@ -1083,8 +1083,10 @@ scoped_refptr<PaintTextBlob> buildTextBlob() {
SkRect bounds = SkRect::MakeWH(100, 100); SkRect bounds = SkRect::MakeWH(100, 100);
const int glyphCount = 10; const int glyphCount = 10;
const auto& runBuffer = builder.AllocRunPosH(font, glyphCount, 0, &bounds); const auto& runBuffer = builder.AllocRunPosH(font, glyphCount, 0, &bounds);
for (int i = 0; i < glyphCount; i++) for (int i = 0; i < glyphCount; i++) {
runBuffer.glyphs[i] = static_cast<SkGlyphID>(i); runBuffer.glyphs[i] = static_cast<SkGlyphID>(i);
runBuffer.pos[i] = SkIntToScalar(i);
}
return builder.TakeTextBlob(); return builder.TakeTextBlob();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment