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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 fEnforcePMColor == s.fEnforcePMColor && | 339 fEnforcePMColor == s.fEnforcePMColor && |
340 backgroundTexture() == s.backgroundTexture(); | 340 backgroundTexture() == s.backgroundTexture(); |
341 } | 341 } |
342 | 342 |
343 const GrBackendFragmentProcessorFactory& GrArithmeticEffect::getFactory() const
{ | 343 const GrBackendFragmentProcessorFactory& GrArithmeticEffect::getFactory() const
{ |
344 return GrTBackendFragmentProcessorFactory<GrArithmeticEffect>::getInstance()
; | 344 return GrTBackendFragmentProcessorFactory<GrArithmeticEffect>::getInstance()
; |
345 } | 345 } |
346 | 346 |
347 void GrArithmeticEffect::onComputeInvariantOutput(InvariantOutput* inout) const
{ | 347 void GrArithmeticEffect::onComputeInvariantOutput(InvariantOutput* inout) const
{ |
348 // TODO: optimize this | 348 // TODO: optimize this |
349 inout->setToUnknown(); | 349 inout->setToUnknown(InvariantOutput::kWill_ReadInput); |
350 } | 350 } |
351 | 351 |
352 /////////////////////////////////////////////////////////////////////////////// | 352 /////////////////////////////////////////////////////////////////////////////// |
353 | 353 |
354 GrGLArithmeticEffect::GrGLArithmeticEffect(const GrBackendProcessorFactory& fact
ory, | 354 GrGLArithmeticEffect::GrGLArithmeticEffect(const GrBackendProcessorFactory& fact
ory, |
355 const GrProcessor&) | 355 const GrProcessor&) |
356 : INHERITED(factory), | 356 : INHERITED(factory), |
357 fEnforcePMColor(true) { | 357 fEnforcePMColor(true) { |
358 } | 358 } |
359 | 359 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 background); | 452 background); |
453 } | 453 } |
454 return true; | 454 return true; |
455 } | 455 } |
456 | 456 |
457 #endif | 457 #endif |
458 | 458 |
459 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) | 459 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_START(SkArithmeticMode) |
460 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) | 460 SK_DEFINE_FLATTENABLE_REGISTRAR_ENTRY(SkArithmeticMode_scalar) |
461 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END | 461 SK_DEFINE_FLATTENABLE_REGISTRAR_GROUP_END |
OLD | NEW |