skia2/tools/RuntimeBlendUtils.h
John Stiles b5ac66c874 Add utility function GetRuntimeBlendForBlendMode for testing.
This will help us write tests confirming that runtime blends work the
same as the built-in blends.

Change-Id: I2f94aa7bbbc7124d09b490fc7509a4c281025307
Bug: skia:12080
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/427618
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
2021-07-14 20:39:09 +00:00

20 lines
474 B
C++

/*
* Copyright 2021 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef RuntimeBlendUtils_DEFINED
#define RuntimeBlendUtils_DEFINED
#include "include/core/SkBlendMode.h"
#include "include/core/SkRefCnt.h"
class SkBlender;
/** Returns a Runtime Effect-based blender which is equivalent to the passed-in SkBlendMode. */
sk_sp<SkBlender> GetRuntimeBlendForBlendMode(SkBlendMode mode);
#endif