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

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

Issue 787873002: Use threshold of 1 texture coord value per pixel w/ nearest neighbor. (Closed) Base URL: https://skia.googlesource.com/skia.git@matrix_prec
Patch Set: update comments Created 6 years 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/SkColorCubeFilter.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 2013 Google Inc. 2 * Copyright 2013 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.h" 8 #include "SkArithmeticMode.h"
9 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkReadBuffer.h" 10 #include "SkReadBuffer.h"
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 308
309 }; 309 };
310 310
311 /////////////////////////////////////////////////////////////////////////////// 311 ///////////////////////////////////////////////////////////////////////////////
312 312
313 GrArithmeticEffect::GrArithmeticEffect(float k1, float k2, float k3, float k4, 313 GrArithmeticEffect::GrArithmeticEffect(float k1, float k2, float k3, float k4,
314 bool enforcePMColor, GrTexture* backgroun d) 314 bool enforcePMColor, GrTexture* backgroun d)
315 : fK1(k1), fK2(k2), fK3(k3), fK4(k4), fEnforcePMColor(enforcePMColor) { 315 : fK1(k1), fK2(k2), fK3(k3), fK4(k4), fEnforcePMColor(enforcePMColor) {
316 this->initClassID<GrArithmeticEffect>(); 316 this->initClassID<GrArithmeticEffect>();
317 if (background) { 317 if (background) {
318 fBackgroundTransform.reset(kLocal_GrCoordSet, background); 318 fBackgroundTransform.reset(kLocal_GrCoordSet, background,
319 GrTextureParams::kNone_FilterMode);
319 this->addCoordTransform(&fBackgroundTransform); 320 this->addCoordTransform(&fBackgroundTransform);
320 fBackgroundAccess.reset(background); 321 fBackgroundAccess.reset(background);
321 this->addTextureAccess(&fBackgroundAccess); 322 this->addTextureAccess(&fBackgroundAccess);
322 } else { 323 } else {
323 this->setWillReadDstColor(); 324 this->setWillReadDstColor();
324 } 325 }
325 } 326 }
326 327
327 GrArithmeticEffect::~GrArithmeticEffect() { 328 GrArithmeticEffect::~GrArithmeticEffect() {
328 } 329 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 background); 443 background);
443 } 444 }
444 return true; 445 return true;
445 } 446 }
446 447
447 #endif 448 #endif
448 449
449 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) 450 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode)
450 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) 451 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar)
451 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END 452 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END
OLDNEW
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkColorCubeFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698