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

Unified Diff: src/effects/SkTableColorFilter.cpp

Issue 1567733005: Add a class representing texture swizzle. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add .a for color table FP texture reads. Created 4 years, 11 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/effects/SkColorCubeFilter.cpp ('k') | src/gpu/GrSwizzle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTableColorFilter.cpp
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index 32617cd6fe4bc9a7c015aa7954e9af8a538a6cd0..d9c07e254cc60416f7c7287380e75b3cd8f83752 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -442,22 +442,22 @@ void GLColorTableEffect::emitCode(EmitArgs& args) {
fragBuilder->codeAppendf("\t\t%s.a = ", args.fOutputColor);
coord.printf("vec2(coord.a, %s.a)", yoffsets);
fragBuilder->appendTextureLookup(args.fSamplers[0], coord.c_str());
- fragBuilder->codeAppend(";\n");
+ fragBuilder->codeAppend(".a;\n");
fragBuilder->codeAppendf("\t\t%s.r = ", args.fOutputColor);
coord.printf("vec2(coord.r, %s.r)", yoffsets);
fragBuilder->appendTextureLookup(args.fSamplers[0], coord.c_str());
- fragBuilder->codeAppend(";\n");
+ fragBuilder->codeAppend(".a;\n");
fragBuilder->codeAppendf("\t\t%s.g = ", args.fOutputColor);
coord.printf("vec2(coord.g, %s.g)", yoffsets);
fragBuilder->appendTextureLookup(args.fSamplers[0], coord.c_str());
- fragBuilder->codeAppend(";\n");
+ fragBuilder->codeAppend(".a;\n");
fragBuilder->codeAppendf("\t\t%s.b = ", args.fOutputColor);
coord.printf("vec2(coord.b, %s.b)", yoffsets);
fragBuilder->appendTextureLookup(args.fSamplers[0], coord.c_str());
- fragBuilder->codeAppend(";\n");
+ fragBuilder->codeAppend(".a;\n");
fragBuilder->codeAppendf("\t\t%s.rgb *= %s.a;\n", args.fOutputColor, args.fOutputColor);
}
@@ -487,7 +487,7 @@ const GrFragmentProcessor* ColorTableEffect::Create(GrContext* context, SkBitmap
ColorTableEffect::ColorTableEffect(GrTexture* texture, GrTextureStripAtlas* atlas, int row,
unsigned flags)
- : fTextureAccess(texture, "a")
+ : fTextureAccess(texture)
, fFlags(flags)
, fAtlas(atlas)
, fRow(row) {
« no previous file with comments | « src/effects/SkColorCubeFilter.cpp ('k') | src/gpu/GrSwizzle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698