| 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::mask_filter_
std::shared_ptr< flutter::DlMaskFilter > mask_filter_
Definition: mask_filter.h:32
impeller::interop::MaskFilter::~MaskFilter
~MaskFilter() override
impeller::interop::MaskFilter::GetMaskFilter
const std::shared_ptr< flutter::DlMaskFilter > & GetMaskFilter() const
Definition: mask_filter.cc:23
impeller::interop::MaskFilter::MaskFilter
MaskFilter(std::shared_ptr< flutter::DlMaskFilter > mask_filter)
Definition: mask_filter.cc:18
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
mask_filter.h
impeller::interop
Definition: context_gles.cc:12
std
Definition: comparable.h:95