Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
shaders_skia.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
7#include "third_party/skia/include/effects/SkRuntimeEffect.h"
8
9namespace Skwasm {
10sk_sp<flutter::DlRuntimeEffect> CreateRuntimeEffect(SkString* source) {
11 auto result = SkRuntimeEffect::MakeForShader(*source);
12 if (result.effect == nullptr) {
13 FML_LOG(ERROR) << "Failed to compile shader. Error Text:\n"
14 << result.errorText.data();
15 return nullptr;
16 } else {
17 return flutter::DlRuntimeEffectSkia::Make(result.effect);
18 }
19}
20} // namespace Skwasm
static sk_sp< DlRuntimeEffect > Make(const sk_sp< SkRuntimeEffect > &runtime_effect)
#define FML_LOG(severity)
Definition logging.h:101
sk_sp< flutter::DlRuntimeEffect > CreateRuntimeEffect(SkString *string)