Flutter Engine
The Flutter Engine
SkMaskFilter.h
Go to the documentation of this file.
1/*
2 * Copyright 2006 The Android Open Source Project
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
8#ifndef SkMaskFilter_DEFINED
9#define SkMaskFilter_DEFINED
10
15
16#include <cstddef>
17
18enum SkBlurStyle : int;
19struct SkDeserialProcs;
20struct SkRect;
21
22/** \class SkMaskFilter
23
24 SkMaskFilter is the base class for object that perform transformations on
25 the mask before drawing it. An example subclass is Blur.
26*/
28public:
29 /** Create a blur maskfilter.
30 * @param style The SkBlurStyle to use
31 * @param sigma Standard deviation of the Gaussian blur to apply. Must be > 0.
32 * @param respectCTM if true the blur's sigma is modified by the CTM.
33 * @return The new blur maskfilter
34 */
35 static sk_sp<SkMaskFilter> MakeBlur(SkBlurStyle style, SkScalar sigma,
36 bool respectCTM = true);
37
38 /**
39 * Returns the approximate bounds that would result from filtering the src rect.
40 * The actual result may be different, but it should be contained within the
41 * returned bounds.
42 */
43 SkRect approximateFilteredBounds(const SkRect& src) const;
44
45 static sk_sp<SkMaskFilter> Deserialize(const void* data, size_t size,
46 const SkDeserialProcs* procs = nullptr);
47
48private:
49 static void RegisterFlattenables();
50 friend class SkFlattenable;
51};
52
53#endif
#define SK_API
Definition: SkAPI.h:35
SkBlurStyle
Definition: SkBlurTypes.h:11
static sk_sp< SkFlattenable > Deserialize(Type, const void *data, size_t length, const SkDeserialProcs *procs=nullptr)
float SkScalar
Definition: extension.cpp:12
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63