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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 | 329 |
330 GrArithmeticEffect::~GrArithmeticEffect() { | 330 GrArithmeticEffect::~GrArithmeticEffect() { |
331 } | 331 } |
332 | 332 |
333 bool GrArithmeticEffect::onIsEqual(const GrFragmentProcessor& sBase) const { | 333 bool GrArithmeticEffect::onIsEqual(const GrFragmentProcessor& sBase) const { |
334 const GrArithmeticEffect& s = sBase.cast<GrArithmeticEffect>(); | 334 const GrArithmeticEffect& s = sBase.cast<GrArithmeticEffect>(); |
335 return fK1 == s.fK1 && | 335 return fK1 == s.fK1 && |
336 fK2 == s.fK2 && | 336 fK2 == s.fK2 && |
337 fK3 == s.fK3 && | 337 fK3 == s.fK3 && |
338 fK4 == s.fK4 && | 338 fK4 == s.fK4 && |
339 fEnforcePMColor == s.fEnforcePMColor && | 339 fEnforcePMColor == s.fEnforcePMColor; |
340 backgroundTexture() == s.backgroundTexture(); | |
341 } | 340 } |
342 | 341 |
343 const GrBackendFragmentProcessorFactory& GrArithmeticEffect::getFactory() const
{ | 342 const GrBackendFragmentProcessorFactory& GrArithmeticEffect::getFactory() const
{ |
344 return GrTBackendFragmentProcessorFactory<GrArithmeticEffect>::getInstance()
; | 343 return GrTBackendFragmentProcessorFactory<GrArithmeticEffect>::getInstance()
; |
345 } | 344 } |
346 | 345 |
347 void GrArithmeticEffect::onComputeInvariantOutput(InvariantOutput* inout) const
{ | 346 void GrArithmeticEffect::onComputeInvariantOutput(InvariantOutput* inout) const
{ |
348 // TODO: optimize this | 347 // TODO: optimize this |
349 inout->setToUnknown(); | 348 inout->setToUnknown(); |
350 } | 349 } |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 background); | 451 background); |
453 } | 452 } |
454 return true; | 453 return true; |
455 } | 454 } |
456 | 455 |
457 #endif | 456 #endif |
458 | 457 |
459 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) | 458 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) |
460 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) | 459 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) |
461 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 460 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |