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

Side by Side Diff: src/gpu/effects/GrDistanceFieldTextureEffect.cpp

Issue 865103002: fLuminance is unsed unless SK_GAMMA_APPLY_TO_A8 is defined (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "GrDistanceFieldTextureEffect.h" 8 #include "GrDistanceFieldTextureEffect.h"
9 #include "GrInvariantOutput.h" 9 #include "GrInvariantOutput.h"
10 #include "GrTexture.h" 10 #include "GrTexture.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 key |= ComputePosKey(gp.viewMatrix()) << 25; 178 key |= ComputePosKey(gp.viewMatrix()) << 25;
179 b->add32(key); 179 b->add32(key);
180 } 180 }
181 181
182 private: 182 private:
183 GrColor fColor; 183 GrColor fColor;
184 UniformHandle fColorUniform; 184 UniformHandle fColorUniform;
185 UniformHandle fTextureSizeUni; 185 UniformHandle fTextureSizeUni;
186 SkISize fTextureSize; 186 SkISize fTextureSize;
187 UniformHandle fLuminanceUni; 187 UniformHandle fLuminanceUni;
188 #ifdef SK_GAMMA_APPLY_TO_A8
188 float fLuminance; 189 float fLuminance;
190 #endif
189 191
190 typedef GrGLGeometryProcessor INHERITED; 192 typedef GrGLGeometryProcessor INHERITED;
191 }; 193 };
192 194
193 /////////////////////////////////////////////////////////////////////////////// 195 ///////////////////////////////////////////////////////////////////////////////
194 196
195 GrDistanceFieldTextureEffect::GrDistanceFieldTextureEffect(GrColor color, 197 GrDistanceFieldTextureEffect::GrDistanceFieldTextureEffect(GrColor color,
196 const SkMatrix& viewM atrix, 198 const SkMatrix& viewM atrix,
197 GrTexture* texture, 199 GrTexture* texture,
198 const GrTextureParams & params, 200 const GrTextureParams & params,
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
871 uint32_t flags = kUseLCD_DistanceFieldEffectFlag; 873 uint32_t flags = kUseLCD_DistanceFieldEffectFlag;
872 flags |= random->nextBool() ? kUniformScale_DistanceFieldEffectMask : 0; 874 flags |= random->nextBool() ? kUniformScale_DistanceFieldEffectMask : 0;
873 flags |= random->nextBool() ? kBGR_DistanceFieldEffectFlag : 0; 875 flags |= random->nextBool() ? kBGR_DistanceFieldEffectFlag : 0;
874 return GrDistanceFieldLCDTextureEffect::Create(GrRandomColor(random), 876 return GrDistanceFieldLCDTextureEffect::Create(GrRandomColor(random),
875 GrProcessorUnitTest::TestMatr ix(random), 877 GrProcessorUnitTest::TestMatr ix(random),
876 textures[texIdx], params, 878 textures[texIdx], params,
877 textures[texIdx2], params2, 879 textures[texIdx2], params2,
878 textColor, 880 textColor,
879 flags); 881 flags);
880 } 882 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698