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

Side by Side Diff: src/effects/gradients/SkGradientShader.cpp

Issue 22340010: Refactor GrGLUniformManager::UniformHandle to initialize itself by default (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: description 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkGradientShaderPriv.h" 8 #include "SkGradientShaderPriv.h"
9 #include "SkLinearGradient.h" 9 #include "SkLinearGradient.h"
10 #include "SkRadialGradient.h" 10 #include "SkRadialGradient.h"
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after
819 819
820 #if SK_SUPPORT_GPU 820 #if SK_SUPPORT_GPU
821 821
822 #include "effects/GrTextureStripAtlas.h" 822 #include "effects/GrTextureStripAtlas.h"
823 #include "GrTBackendEffectFactory.h" 823 #include "GrTBackendEffectFactory.h"
824 #include "SkGr.h" 824 #include "SkGr.h"
825 825
826 GrGLGradientEffect::GrGLGradientEffect(const GrBackendEffectFactory& factory) 826 GrGLGradientEffect::GrGLGradientEffect(const GrBackendEffectFactory& factory)
827 : INHERITED(factory) 827 : INHERITED(factory)
828 , fCachedYCoord(SK_ScalarMax) 828 , fCachedYCoord(SK_ScalarMax)
829 , fFSYUni(GrGLUniformManager::kInvalidUniformHandle)
830 , fEffectMatrix(kCoordsType) { 829 , fEffectMatrix(kCoordsType) {
831 } 830 }
832 831
833 GrGLGradientEffect::~GrGLGradientEffect() { } 832 GrGLGradientEffect::~GrGLGradientEffect() { }
834 833
835 void GrGLGradientEffect::emitYCoordUniform(GrGLShaderBuilder* builder) { 834 void GrGLGradientEffect::emitYCoordUniform(GrGLShaderBuilder* builder) {
836 fFSYUni = builder->addUniform(GrGLShaderBuilder::kFragment_ShaderType, 835 fFSYUni = builder->addUniform(GrGLShaderBuilder::kFragment_ShaderType,
837 kFloat_GrSLType, "GradientYCoordFS"); 836 kFloat_GrSLType, "GradientYCoordFS");
838 } 837 }
839 838
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 (*stops)[i] = stop; 976 (*stops)[i] = stop;
978 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st op) : 1.f; 977 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st op) : 1.f;
979 } 978 }
980 } 979 }
981 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM odeCount)); 980 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM odeCount));
982 981
983 return outColors; 982 return outColors;
984 } 983 }
985 984
986 #endif 985 #endif
OLDNEW
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/gradients/SkTwoPointConicalGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698