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

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

Issue 1414373002: Move shader precision modifier check onto GLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 2 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 | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | 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 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 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSweepGradient) 901 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkSweepGradient)
902 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTwoPointConicalGradient) 902 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkTwoPointConicalGradient)
903 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 903 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
904 904
905 /////////////////////////////////////////////////////////////////////////////// 905 ///////////////////////////////////////////////////////////////////////////////
906 906
907 #if SK_SUPPORT_GPU 907 #if SK_SUPPORT_GPU
908 908
909 #include "effects/GrTextureStripAtlas.h" 909 #include "effects/GrTextureStripAtlas.h"
910 #include "GrInvariantOutput.h" 910 #include "GrInvariantOutput.h"
911 #include "gl/GrGLContext.h"
911 #include "gl/builders/GrGLProgramBuilder.h" 912 #include "gl/builders/GrGLProgramBuilder.h"
912 #include "SkGr.h" 913 #include "SkGr.h"
913 914
914 GrGLGradientEffect::GrGLGradientEffect() 915 GrGLGradientEffect::GrGLGradientEffect()
915 : fCachedYCoord(SK_ScalarMax) { 916 : fCachedYCoord(SK_ScalarMax) {
916 } 917 }
917 918
918 GrGLGradientEffect::~GrGLGradientEffect() { } 919 GrGLGradientEffect::~GrGLGradientEffect() { }
919 920
920 void GrGLGradientEffect::emitUniforms(GrGLFPBuilder* builder, const GrGradientEf fect& ge) { 921 void GrGLGradientEffect::emitUniforms(GrGLFPBuilder* builder, const GrGradientEf fect& ge) {
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 (*stops)[i] = stop; 1205 (*stops)[i] = stop;
1205 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st op) : 1.f; 1206 stop = i < outColors - 1 ? stop + random->nextUScalar1() * (1.f - st op) : 1.f;
1206 } 1207 }
1207 } 1208 }
1208 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM odeCount)); 1209 *tm = static_cast<SkShader::TileMode>(random->nextULessThan(SkShader::kTileM odeCount));
1209 1210
1210 return outColors; 1211 return outColors;
1211 } 1212 }
1212 1213
1213 #endif 1214 #endif
OLDNEW
« no previous file with comments | « src/effects/SkBlurMaskFilter.cpp ('k') | src/effects/gradients/SkSweepGradient.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698