| /* |
| * Copyright 2019 Google Inc. |
| * |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| */ |
| |
| #include "modules/skottie/src/effects/Effects.h" |
| |
| #include "src/utils/SkJSON.h" |
| |
| namespace skottie { |
| namespace internal { |
| |
| const skjson::Value& EffectBuilder::GetPropValue(const skjson::ArrayValue& jprops, |
| size_t prop_index) { |
| static skjson::NullValue kNull; |
| |
| if (prop_index >= jprops.size()) { |
| return kNull; |
| } |
| |
| const skjson::ObjectValue* jprop = jprops[prop_index]; |
| |
| return jprop ? (*jprop)["v"] : kNull; |
| } |
| |
| } // namespace internal |
| } // namespace skottie |