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

Side by Side Diff: src/effects/SkArithmeticMode_gpu.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/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurMaskFilter.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 "SkArithmeticMode_gpu.h" 8 #include "SkArithmeticMode_gpu.h"
9 9
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 const char* kUni = args.fUniformHandler->getUniformCStr(fKUni); 68 const char* kUni = args.fUniformHandler->getUniformCStr(fKUni);
69 69
70 add_arithmetic_code(fragBuilder, 70 add_arithmetic_code(fragBuilder,
71 args.fInputColor, 71 args.fInputColor,
72 dstColor.c_str(), 72 dstColor.c_str(),
73 args.fOutputColor, 73 args.fOutputColor,
74 kUni, 74 kUni,
75 arith.enforcePMColor()); 75 arith.enforcePMColor());
76 } 76 }
77 77
78 static void GenKey(const GrProcessor& proc, const GrGLSLCaps& caps, GrProces sorKeyBuilder* b) { 78 static void GenKey(const GrProcessor& proc, const GrGLSLCaps&, GrProcessorKe yBuilder* b) {
79 const GrArithmeticFP& arith = proc.cast<GrArithmeticFP>(); 79 const GrArithmeticFP& arith = proc.cast<GrArithmeticFP>();
80 uint32_t key = arith.enforcePMColor() ? 1 : 0; 80 uint32_t key = arith.enforcePMColor() ? 1 : 0;
81 b->add32(key); 81 b->add32(key);
82 } 82 }
83 83
84 protected: 84 protected:
85 void onSetData(const GrGLSLProgramDataManager& pdman, const GrProcessor& pro c) override { 85 void onSetData(const GrGLSLProgramDataManager& pdman, const GrProcessor& pro c) override {
86 const GrArithmeticFP& arith = proc.cast<GrArithmeticFP>(); 86 const GrArithmeticFP& arith = proc.cast<GrArithmeticFP>();
87 pdman.set4f(fKUni, arith.k1(), arith.k2(), arith.k3(), arith.k4()); 87 pdman.set4f(fKUni, arith.k1(), arith.k2(), arith.k3(), arith.k4());
88 } 88 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 float k1 = d->fRandom->nextF(); 298 float k1 = d->fRandom->nextF();
299 float k2 = d->fRandom->nextF(); 299 float k2 = d->fRandom->nextF();
300 float k3 = d->fRandom->nextF(); 300 float k3 = d->fRandom->nextF();
301 float k4 = d->fRandom->nextF(); 301 float k4 = d->fRandom->nextF();
302 bool enforcePMColor = d->fRandom->nextBool(); 302 bool enforcePMColor = d->fRandom->nextBool();
303 303
304 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor); 304 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor);
305 } 305 }
306 306
307 #endif 307 #endif
OLDNEW
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurMaskFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698