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

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

Issue 1661143003: Next round of GrGLSLFragmentProcessor-derived class cleanup (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix overlength line Created 4 years, 10 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/SkTableColorFilter.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.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 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 "GrInvariantOutput.h" 9 #include "GrInvariantOutput.h"
10 #include "glsl/GrGLSLFragmentProcessor.h" 10 #include "glsl/GrGLSLFragmentProcessor.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 GrColorUnpackB(color) * scale, 56 GrColorUnpackB(color) * scale,
57 GrColorUnpackA(color) * scale, 57 GrColorUnpackA(color) * scale,
58 }; 58 };
59 pdm.set4fv(fColorUniform, 1, floatColor); 59 pdm.set4fv(fColorUniform, 1, floatColor);
60 fPrevColor = color; 60 fPrevColor = color;
61 } 61 }
62 } 62 }
63 63
64 private: 64 private:
65 GrGLSLProgramDataManager::UniformHandle fColorUniform; 65 GrGLSLProgramDataManager::UniformHandle fColorUniform;
66 GrColor fPrevColor; 66 GrColor fPrevColor;
67 67
68 typedef GrGLSLFragmentProcessor INHERITED; 68 typedef GrGLSLFragmentProcessor INHERITED;
69 }; 69 };
70 70
71 /////////////////////////////////////////////////////////////////////////////// 71 ///////////////////////////////////////////////////////////////////////////////
72 72
73 void GrConstColorProcessor::onComputeInvariantOutput(GrInvariantOutput* inout) c onst { 73 void GrConstColorProcessor::onComputeInvariantOutput(GrInvariantOutput* inout) c onst {
74 if (kIgnore_InputMode == fMode) { 74 if (kIgnore_InputMode == fMode) {
75 inout->setToOther(kRGBA_GrColorComponentFlags, fColor, 75 inout->setToOther(kRGBA_GrColorComponentFlags, fColor,
76 GrInvariantOutput::kWillNot_ReadInput); 76 GrInvariantOutput::kWillNot_ReadInput);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 color = 0; 128 color = 0;
129 break; 129 break;
130 case 2: 130 case 2:
131 color = d->fRandom->nextULessThan(0x100); 131 color = d->fRandom->nextULessThan(0x100);
132 color = color | (color << 8) | (color << 16) | (color << 24); 132 color = color | (color << 8) | (color << 16) | (color << 24);
133 break; 133 break;
134 } 134 }
135 InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputMode Cnt)); 135 InputMode mode = static_cast<InputMode>(d->fRandom->nextULessThan(kInputMode Cnt));
136 return GrConstColorProcessor::Create(color, mode); 136 return GrConstColorProcessor::Create(color, mode);
137 } 137 }
OLDNEW
« no previous file with comments | « src/effects/SkTableColorFilter.cpp ('k') | src/gpu/effects/GrConvexPolyEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698