| Flutter Impeller |

mask_filter.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
5 #include "impeller/toolkit/interop/mask_filter.h"
6
7 namespace impeller::interop {
8
9 ScopedObject<MaskFilter> MaskFilter::MakeBlur(flutter::DlBlurStyle style,
10 float sigma) {
11 auto filter = flutter::DlBlurMaskFilter::Make(style, sigma);
12 if (!filter) {
13 return nullptr;
14 }
15 return Create<MaskFilter>(std::move(filter));
16 }
17
18 MaskFilter::MaskFilter(std::shared_ptr<flutter::DlMaskFilter> mask_filter)
19 : mask_filter_(std::move(mask_filter)) {}
20
21 MaskFilter::~MaskFilter() = default;
22
23 const std::shared_ptr<flutter::DlMaskFilter>& MaskFilter::GetMaskFilter()
24 const {
25 return mask_filter_;
26 }
27
28 } // namespace impeller::interop
impeller::interop::MaskFilter::MakeBlur
static ScopedObject< MaskFilter > MakeBlur(flutter::DlBlurStyle style, float sigma)
Definition: mask_filter.cc:9
impeller::interop::ScopedObject
Definition: object.h:67
impeller::interop::MaskFilter::mask_filter_
std::shared_ptr< flutter::DlMaskFilter > mask_filter_
Definition: mask_filter.h:32
impeller::interop
Definition: color_filter.cc:7
impeller::interop::MaskFilter::~MaskFilter
~MaskFilter() override
impeller::interop::MaskFilter::MaskFilter
MaskFilter(std::shared_ptr< flutter::DlMaskFilter > mask_filter)
Definition: mask_filter.cc:18
mask_filter
std::shared_ptr< DlMaskFilter > mask_filter
Definition: dl_golden_blur_unittests.cc:25
std
Definition: comparable.h:95
impeller::interop::MaskFilter::GetMaskFilter
const std::shared_ptr< flutter::DlMaskFilter > & GetMaskFilter() const
Definition: mask_filter.cc:23
mask_filter.h