Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
RuntimeBlendUtils.cpp
Go to the documentation of this file.
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
12
15 uniform blender b;
16 half4 main(half4 src, half4 dst) {
17 return b.eval(src, dst);
18 }
19 )"));
20
21 SkASSERTF(result.effect, "%s", result.errorText.c_str());
22
23 SkRuntimeBlendBuilder builder(result.effect);
24 builder.child("b") = SkBlender::Mode(mode);
25 return builder.makeBlender();
26}
sk_sp< SkBlender > GetRuntimeBlendForBlendMode(SkBlendMode mode)
#define SkASSERTF(cond, fmt,...)
Definition SkAssert.h:117
SkBlendMode
Definition SkBlendMode.h:38
static sk_sp< SkBlender > Mode(SkBlendMode mode)
static Result MakeForBlender(SkString sksl, const Options &)
GAsyncResult * result