GrGLSLBlend.h 825 B

12345678910111213141516171819202122232425262728
  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 GrGLBlend_DEFINED
  8. #define GrGLBlend_DEFINED
  9. #include "include/core/SkBlendMode.h"
  10. #include "include/core/SkRegion.h"
  11. class GrGLSLFragmentBuilder;
  12. namespace GrGLSLBlend {
  13. /*
  14. * Appends GLSL code to fsBuilder that assigns a specified blend of the srcColor and dstColor
  15. * variables to the outColor variable.
  16. */
  17. void AppendMode(GrGLSLFragmentBuilder* fsBuilder, const char* srcColor,
  18. const char* dstColor, const char* outColor, SkBlendMode mode);
  19. void AppendRegionOp(GrGLSLFragmentBuilder* fsBuilder, const char* srcColor,
  20. const char* dstColor, const char* outColor, SkRegion::Op regionOp);
  21. };
  22. #endif