Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: src/gpu/effects/GrTextureDomain.cpp

Issue 1320433002: Fix for MSAN unintialized value (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/effects/GrTextureDomain.cpp
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp
index 3810c3482f5f2f2491b524d5c2f2e736cdad3a15..e5ae18c961247809617ef13f85d77a78ec90d8f3 100644
--- a/src/gpu/effects/GrTextureDomain.cpp
+++ b/src/gpu/effects/GrTextureDomain.cpp
@@ -146,7 +146,7 @@ void GrTextureDomain::GLDomain::setData(const GrGLProgramDataManager& pdman,
GrSurfaceOrigin textureOrigin) {
SkASSERT(textureDomain.mode() == fMode);
if (kIgnore_Mode != textureDomain.mode()) {
- GrGLfloat values[4] = {
+ GrGLfloat values[kPrevDomainCount] = {
SkScalarToFloat(textureDomain.domain().left()),
SkScalarToFloat(textureDomain.domain().top()),
SkScalarToFloat(textureDomain.domain().right()),
@@ -160,9 +160,9 @@ void GrTextureDomain::GLDomain::setData(const GrGLProgramDataManager& pdman,
// of elements so that values = (l, t, r, b).
SkTSwap(values[1], values[3]);
}
- if (0 != memcmp(values, fPrevDomain, 4 * sizeof(GrGLfloat))) {
+ if (0 != memcmp(values, fPrevDomain, kPrevDomainCount * sizeof(GrGLfloat))) {
pdman.set4fv(fDomainUni, 1, values);
- memcpy(fPrevDomain, values, 4 * sizeof(GrGLfloat));
+ memcpy(fPrevDomain, values, kPrevDomainCount * sizeof(GrGLfloat));
}
}
}
« no previous file with comments | « src/gpu/effects/GrTextureDomain.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698