OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |