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

Side by Side Diff: src/effects/SkArithmeticMode_gpu.cpp

Issue 858373006: Fix casting bug in GrArithmeticXP (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | « no previous file | no next file » | 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 }; 206 };
207 207
208 /////////////////////////////////////////////////////////////////////////////// 208 ///////////////////////////////////////////////////////////////////////////////
209 209
210 GrArithmeticXP::GrArithmeticXP(float k1, float k2, float k3, float k4, bool enfo rcePMColor) 210 GrArithmeticXP::GrArithmeticXP(float k1, float k2, float k3, float k4, bool enfo rcePMColor)
211 : fK1(k1) 211 : fK1(k1)
212 , fK2(k2) 212 , fK2(k2)
213 , fK3(k3) 213 , fK3(k3)
214 , fK4(k4) 214 , fK4(k4)
215 , fEnforcePMColor(enforcePMColor) { 215 , fEnforcePMColor(enforcePMColor) {
216 this->initClassID<GrPorterDuffXferProcessor>(); 216 this->initClassID<GrArithmeticXP>();
217 this->setWillReadDstColor(); 217 this->setWillReadDstColor();
218 } 218 }
219 219
220 void GrArithmeticXP::getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuild er* b) const { 220 void GrArithmeticXP::getGLProcessorKey(const GrGLCaps& caps, GrProcessorKeyBuild er* b) const {
221 GLArithmeticXP::GenKey(*this, caps, b); 221 GLArithmeticXP::GenKey(*this, caps, b);
222 } 222 }
223 223
224 GrGLXferProcessor* GrArithmeticXP::createGLInstance() const { 224 GrGLXferProcessor* GrArithmeticXP::createGLInstance() const {
225 return SkNEW_ARGS(GLArithmeticXP, (*this)); 225 return SkNEW_ARGS(GLArithmeticXP, (*this));
226 } 226 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 float k1 = random->nextF(); 261 float k1 = random->nextF();
262 float k2 = random->nextF(); 262 float k2 = random->nextF();
263 float k3 = random->nextF(); 263 float k3 = random->nextF();
264 float k4 = random->nextF(); 264 float k4 = random->nextF();
265 bool enforcePMColor = random->nextBool(); 265 bool enforcePMColor = random->nextBool();
266 266
267 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor); 267 return GrArithmeticXPFactory::Create(k1, k2, k3, k4, enforcePMColor);
268 } 268 }
269 269
270 #endif 270 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698