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

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

Issue 1443743002: Rename some processor functions from GL to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@primProcs
Patch Set: nits Created 5 years, 1 month 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/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "effects/GrConstColorProcessor.h" 8 #include "effects/GrConstColorProcessor.h"
9 #include "glsl/GrGLSLFragmentProcessor.h" 9 #include "glsl/GrGLSLFragmentProcessor.h"
10 #include "glsl/GrGLSLFragmentShaderBuilder.h" 10 #include "glsl/GrGLSLFragmentShaderBuilder.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } else { 85 } else {
86 if (colorIsSingleChannel) { 86 if (colorIsSingleChannel) {
87 inout->mulAlphaByKnownSingleComponent(r); 87 inout->mulAlphaByKnownSingleComponent(r);
88 } else { 88 } else {
89 inout->mulAlphaByKnownFourComponents(fColor); 89 inout->mulAlphaByKnownFourComponents(fColor);
90 } 90 }
91 } 91 }
92 } 92 }
93 } 93 }
94 94
95 void GrConstColorProcessor::onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKe yBuilder* b) const { 95 void GrConstColorProcessor::onGetGLSLProcessorKey(const GrGLSLCaps&,
96 GrProcessorKeyBuilder* b) cons t {
96 b->add32(fMode); 97 b->add32(fMode);
97 } 98 }
98 99
99 GrGLSLFragmentProcessor* GrConstColorProcessor::onCreateGLInstance() const { 100 GrGLSLFragmentProcessor* GrConstColorProcessor::onCreateGLSLInstance() const {
100 return new GLConstColorProcessor; 101 return new GLConstColorProcessor;
101 } 102 }
102 103
103 bool GrConstColorProcessor::onIsEqual(const GrFragmentProcessor& other) const { 104 bool GrConstColorProcessor::onIsEqual(const GrFragmentProcessor& other) const {
104 const GrConstColorProcessor& that = other.cast<GrConstColorProcessor>(); 105 const GrConstColorProcessor& that = other.cast<GrConstColorProcessor>();
105 return fMode == that.fMode && fColor == that.fColor; 106 return fMode == that.fMode && fColor == that.fColor;
106 } 107 }
107 108
108 /////////////////////////////////////////////////////////////////////////////// 109 ///////////////////////////////////////////////////////////////////////////////
109 110
(...skipping 15 matching lines...) Expand all
125 color = 0; 126 color = 0;
126 break; 127 break;
127 case 2: 128 case 2:
128 color = d->fRandom->nextULessThan(0x100); 129 color = d->fRandom->nextULessThan(0x100);
129 color = color | (color << 8) | (color << 16) | (color << 24); 130 color = color | (color << 8) | (color << 16) | (color << 24);
130 break; 131 break;
131 } 132 }
132 InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputMode Cnt)); 133 InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputMode Cnt));
133 return GrConstColorProcessor::Create(color, mode); 134 return GrConstColorProcessor::Create(color, mode);
134 } 135 }
OLDNEW
« no previous file with comments | « src/gpu/effects/GrConfigConversionEffect.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698