Flutter Engine
The Flutter Engine
third_party
skia
src
core
SkMaskCache.h
Go to the documentation of this file.
1
/*
2
* Copyright 2014 Google Inc.
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 SkMaskCache_DEFINED
9
#define SkMaskCache_DEFINED
10
11
#include "
include/core/SkScalar.h
"
12
13
class
SkCachedData
;
14
class
SkRRect
;
15
class
SkResourceCache
;
16
enum
SkBlurStyle
:
int
;
17
struct
SkMask
;
18
struct
SkRect
;
19
template
<
typename
T>
class
SkTLazy
;
20
21
class
SkMaskCache
{
22
public
:
23
/**
24
* On success, return a ref to the SkCachedData that holds the pixels, and have mask
25
* already point to that memory.
26
*
27
* On failure, return nullptr.
28
*/
29
static
SkCachedData
*
FindAndRef
(
SkScalar
sigma,
SkBlurStyle
style,
30
const
SkRRect
&
rrect
,
SkTLazy<SkMask>
* mask,
31
SkResourceCache
* localCache =
nullptr
);
32
static
SkCachedData
*
FindAndRef
(
SkScalar
sigma,
SkBlurStyle
style,
33
const
SkRect
rects[],
int
count
,
SkTLazy<SkMask>
* mask,
34
SkResourceCache
* localCache =
nullptr
);
35
36
/**
37
* Add a mask and its pixel-data to the cache.
38
*/
39
static
void
Add
(
SkScalar
sigma,
SkBlurStyle
style,
40
const
SkRRect
&
rrect
,
const
SkMask
& mask,
SkCachedData
*
data
,
41
SkResourceCache
* localCache =
nullptr
);
42
static
void
Add
(
SkScalar
sigma,
SkBlurStyle
style,
43
const
SkRect
rects[],
int
count
,
const
SkMask
& mask,
SkCachedData
*
data
,
44
SkResourceCache
* localCache =
nullptr
);
45
};
46
47
#endif
count
int count
Definition:
FontMgrTest.cpp:50
SkBlurStyle
SkBlurStyle
Definition:
SkBlurTypes.h:11
SkScalar.h
SkCachedData
Definition:
SkCachedData.h:19
SkMaskCache
Definition:
SkMaskCache.h:21
SkMaskCache::Add
static void Add(SkScalar sigma, SkBlurStyle style, const SkRRect &rrect, const SkMask &mask, SkCachedData *data, SkResourceCache *localCache=nullptr)
Definition:
SkMaskCache.cpp:102
SkMaskCache::FindAndRef
static SkCachedData * FindAndRef(SkScalar sigma, SkBlurStyle style, const SkRRect &rrect, SkTLazy< SkMask > *mask, SkResourceCache *localCache=nullptr)
Definition:
SkMaskCache.cpp:88
SkRRect
Definition:
SkRRect.h:35
SkResourceCache
Definition:
SkResourceCache.h:31
SkTLazy
Definition:
SkTLazy.h:20
SkScalar
float SkScalar
Definition:
extension.cpp:12
SkRecords::rrect
SkRRect rrect
Definition:
SkRecords.h:232
tools.skpbench.skpbench.int
int
Definition:
skpbench.py:49
SkMask
Definition:
SkMask.h:25
SkRect
Definition:
extension.cpp:13
data
std::shared_ptr< const fml::Mapping > data
Definition:
texture_gles.cc:63
Generated on Sun Jun 23 2024 21:56:12 for Flutter Engine by
1.9.4