Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(87)

Side by Side Diff: src/core/SkMaskCache.h

Issue 670063004: Add SkMaskCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add namespace for key in MaskCache Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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 "SkBlurTypes.h"
12 #include "SkCachedData.h"
13 #include "SkMask.h"
14 #include "SkRect.h"
15 #include "SkResourceCache.h"
16 #include "SkRRect.h"
17
18 class SkMaskCache {
19 public:
20 /**
21 * On success, return a ref to the SkCachedData that holds the pixels, and h ave mask
22 * already point to that memory.
23 *
24 * On failure, return NULL.
25 */
26 static SkCachedData* FindAndRef(SkScalar sigma, const SkRRect& rrect, SkBlur Style style,
27 SkBlurQuality quality, SkMask* mask,
28 SkResourceCache* localCache = NULL);
29 static SkCachedData* FindAndRef(SkScalar sigma, const SkRect rects[], int co unt,
30 SkBlurStyle style,SkMask* mask,
31 SkResourceCache* localCache = NULL);
32
33 /**
34 * Add a mask and its pixel-data to the cache.
35 */
36 static void Add(SkScalar sigma, const SkRRect& rrect, SkBlurStyle style, SkB lurQuality quality,
37 const SkMask& mask, SkCachedData* data, SkResourceCache* loc alCache = NULL);
38 static void Add(SkScalar sigma, const SkRect rects[], int count, SkBlurStyle style,
39 const SkMask& mask, SkCachedData* data, SkResourceCache* loc alCache = NULL);
40 };
41
42 #endif
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | src/core/SkMaskCache.cpp » ('j') | src/core/SkMaskCache.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698