GrSharedEnums.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright 2017 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 GrSharedEnums_DEFINED
  8. #define GrSharedEnums_DEFINED
  9. /*************************************************************************************************/
  10. /* This file is used from both C++ and SkSL, so we need to stick to syntax compatible with both. */
  11. /*************************************************************************************************/
  12. /**
  13. * We have coverage effects that clip rendering to the edge of some geometric primitive.
  14. * This enum specifies how that clipping is performed. Not all factories that take a
  15. * GrProcessorEdgeType will succeed with all values and it is up to the caller to check for
  16. * a NULL return.
  17. */
  18. enum class GrClipEdgeType {
  19. kFillBW,
  20. kFillAA,
  21. kInverseFillBW,
  22. kInverseFillAA,
  23. kHairlineAA,
  24. kLast = kHairlineAA
  25. };
  26. enum class PMConversion {
  27. kToPremul = 0,
  28. kToUnpremul = 1,
  29. kPMConversionCnt = 2
  30. };
  31. #endif