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

Unified Diff: src/effects/SkArithmeticMode.cpp

Issue 23706003: Fix case where GrGLEffectMatrix gives back a dangling ptr for the coords var name. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Rob's comments Created 7 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/core/SkXfermode.cpp ('k') | src/effects/SkBicubicImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkArithmeticMode.cpp
diff --git a/src/effects/SkArithmeticMode.cpp b/src/effects/SkArithmeticMode.cpp
index ed29130369e9c71fdde912e10ff0a1142336cc4e..1efa11510609dbd802aaa53158411672f58f09ee 100644
--- a/src/effects/SkArithmeticMode.cpp
+++ b/src/effects/SkArithmeticMode.cpp
@@ -351,12 +351,12 @@ void GrGLArithmeticEffect::emitCode(GrGLShaderBuilder* builder,
GrTexture* backgroundTex = drawEffect.castEffect<GrArithmeticEffect>().backgroundTexture();
const char* dstColor;
if (backgroundTex) {
- const char* bgCoords;
+ SkString bgCoords;
GrSLType bgCoordsType = fBackgroundEffectMatrix.emitCode(builder, key, &bgCoords, NULL, "BG");
builder->fsCodeAppend("\t\tvec4 bgColor = ");
builder->appendTextureLookup(GrGLShaderBuilder::kFragment_ShaderType,
samplers[0],
- bgCoords,
+ bgCoords.c_str(),
bgCoordsType);
builder->fsCodeAppendf(";\n");
dstColor = "bgColor";
« no previous file with comments | « src/core/SkXfermode.cpp ('k') | src/effects/SkBicubicImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698