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

Side by Side Diff: src/core/SkLightingShader.cpp

Issue 1309653003: Speculative valgrind fix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 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 /* 2 /*
3 * Copyright 2015 Google Inc. 3 * Copyright 2015 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "SkBitmapProcState.h" 9 #include "SkBitmapProcState.h"
10 #include "SkColor.h" 10 #include "SkColor.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 this->initClassID<LightingFP>(); 162 this->initClassID<LightingFP>();
163 } 163 }
164 164
165 class LightingGLFP : public GrGLFragmentProcessor { 165 class LightingGLFP : public GrGLFragmentProcessor {
166 public: 166 public:
167 LightingGLFP() { 167 LightingGLFP() {
168 fLightDir.fX = 10000.0f; 168 fLightDir.fX = 10000.0f;
169 fLightColor.fX = 0.0f; 169 fLightColor.fX = 0.0f;
170 fAmbientColor.fX = 0.0f; 170 fAmbientColor.fX = 0.0f;
171 fInvNormRotation.fX = 0.0f; 171 fInvNormRotation.set(0.0f, 0.0f);
172 } 172 }
173 173
174 void emitCode(EmitArgs& args) override { 174 void emitCode(EmitArgs& args) override {
175 175
176 GrGLFragmentBuilder* fpb = args.fBuilder->getFragmentShaderBuilder() ; 176 GrGLFragmentBuilder* fpb = args.fBuilder->getFragmentShaderBuilder() ;
177 177
178 // add uniforms 178 // add uniforms
179 const char* lightDirUniName = NULL; 179 const char* lightDirUniName = NULL;
180 fLightDirUni = args.fBuilder->addUniform(GrGLProgramBuilder::kFragme nt_Visibility, 180 fLightDirUni = args.fBuilder->addUniform(GrGLProgramBuilder::kFragme nt_Visibility,
181 kVec3f_GrSLType, kDefault_G rSLPrecision, 181 kVec3f_GrSLType, kDefault_G rSLPrecision,
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 invNormRotation, diffLocalM, normLo calM)); 729 invNormRotation, diffLocalM, normLo calM));
730 } 730 }
731 731
732 /////////////////////////////////////////////////////////////////////////////// 732 ///////////////////////////////////////////////////////////////////////////////
733 733
734 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingShader) 734 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkLightingShader)
735 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLightingShaderImpl) 735 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkLightingShaderImpl)
736 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 736 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
737 737
738 /////////////////////////////////////////////////////////////////////////////// 738 ///////////////////////////////////////////////////////////////////////////////
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