aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrContext.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2018-05-14 14:54:06 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-14 19:39:39 +0000
commit3d945e840c1955b5756fdeb696599c2818ed95fc (patch)
tree7c42a47b2a21d468f6c755dc9400ea424eae4610 /src/gpu/GrContext.cpp
parenta20681c2ac9d1a36875289b6207cbcd3a36132f7 (diff)
Clear temp buffer in GrContextPriv::readSurfacePixels2
This fixes an issue on Chrome's MSAN bots where glReadPixels into the temp buffer doesn't actually overwrite the buffer. Change-Id: I9cbdd208d3bdd0d53e96bbef1996648a3a21f66f Reviewed-on: https://skia-review.googlesource.com/128013 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r--src/gpu/GrContext.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index aec4e0037a..5be510d131 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1181,6 +1181,8 @@ bool GrContextPriv::readSurfacePixels2(GrSurfaceContext* src, int left, int top,
finalPixmap.reset(finalII, buffer, rowBytes);
buffer = tempPixmap.writable_addr();
rowBytes = tempPixmap.rowBytes();
+ // Chrome msan bots require this.
+ sk_bzero(buffer, tempPixmap.computeByteSize());
}
if (srcSurface->surfacePriv().hasPendingWrite()) {