SkXfermodeInterpretation.h 899 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Copyright 2015 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef SkXfermodeInterpretation_DEFINED
  8. #define SkXfermodeInterpretation_DEFINED
  9. class SkPaint;
  10. /**
  11. * By analyzing the paint, we may decide we can take special
  12. * action. This enum lists our possible actions.
  13. */
  14. enum SkXfermodeInterpretation {
  15. kNormal_SkXfermodeInterpretation, //< draw normally
  16. kSrcOver_SkXfermodeInterpretation, //< draw as if in srcover mode
  17. kSkipDrawing_SkXfermodeInterpretation //< draw nothing
  18. };
  19. /**
  20. * Given a paint, determine whether the paint's transfer mode can be
  21. * replaced with kSrcOver_Mode or not drawn at all. This is used by
  22. * SkBlitter and SkPDFDevice.
  23. */
  24. SkXfermodeInterpretation SkInterpretXfermode(const SkPaint&, bool dstIsOpaque);
  25. #endif // SkXfermodeInterpretation_DEFINED