Flutter Engine
The Flutter Engine
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
12
13class SkCachedData;
14class SkRRect;
15class SkResourceCache;
16enum SkBlurStyle : int;
17struct SkMask;
18struct SkRect;
19template <typename T> class SkTLazy;
20
22public:
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
int count
Definition: FontMgrTest.cpp:50
SkBlurStyle
Definition: SkBlurTypes.h:11
static void Add(SkScalar sigma, SkBlurStyle style, const SkRRect &rrect, const SkMask &mask, SkCachedData *data, SkResourceCache *localCache=nullptr)
static SkCachedData * FindAndRef(SkScalar sigma, SkBlurStyle style, const SkRRect &rrect, SkTLazy< SkMask > *mask, SkResourceCache *localCache=nullptr)
Definition: SkMaskCache.cpp:88
float SkScalar
Definition: extension.cpp:12
SkRRect rrect
Definition: SkRecords.h:232
Definition: SkMask.h:25
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63