1/* 2 * Copyright 2021 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 8#ifndef RuntimeBlendUtils_DEFINED 9#define RuntimeBlendUtils_DEFINED 10 11#include "include/core/SkBlendMode.h" 12#include "include/core/SkRefCnt.h" 13 14class SkBlender; 15 16/** 17 * Returns a Runtime Effect-based blender which is equivalent to the passed-in SkBlendMode. 18 * This should generate the same output as the equivalent SkBlendMode operation, but always uses 19 * SkSL to perform the blend operation instead of relying on specialized/fixed-function code. 20 * This is useful for verifying that Runtime Blends are working as expected throughout the pipeline. 21 */ 22sk_sp<SkBlender> GetRuntimeBlendForBlendMode(SkBlendMode mode); 23 24#endif 25