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

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

Issue 670063004: Add SkMaskCache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months 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
« no previous file with comments | « gyp/tests.gypi ('k') | src/core/SkMaskCache.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "SkCachedData.h"
12 #include "SkMask.h"
13 #include "SkRect.h"
14 #include "SkResourceCache.h"
15 #include "SkRRect.h"
16
17 class SkMaskCache {
18 public:
19 /**
20 * On success, return a ref to the SkCachedData that holds the pixels, and h ave mask
21 * already point to that memory.
22 *
23 * On failure, return NULL.
24 */
25 static SkCachedData* FindAndRef(SkScalar sigma, const SkRRect& rrect,
26 SkMask* mask, SkResourceCache* localCache = NULL);
27 static SkCachedData* FindAndRef(SkScalar sigma, const SkRect rects[],
28 int32_t count, SkMask* mask,
reed1 2014/10/22 13:36:20 nit: skia just uses "int" for counts.
29 SkResourceCache* localCache = NULL);
30
31 /**
32 * Add a mask and its pixel-data to the cache.
33 */
34 static void Add(SkScalar sigma, const SkRRect& rrect,
35 const SkMask& mask, SkCachedData* data,
36 SkResourceCache* localCache = NULL);
37 static void Add(SkScalar sigma, const SkRect rects[], int32_t count,
38 const SkMask& mask, SkCachedData* data,
39 SkResourceCache* localCache = NULL);
40 };
41
42 #endif
OLDNEW
« no previous file with comments | « gyp/tests.gypi ('k') | src/core/SkMaskCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698