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

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

Issue 471473002: Optimize CSS box-shadow performance (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: store SkMask and SkCachedData in cache 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
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 "SkRRect.h"
15
16 class SkMaskCache {
17 public:
18 /**
19 * On success, return a ref to the SkCachedData that holds the pixels, and h ave mask
20 * already point to that memory.
21 *
22 * On failure, return NULL.
23 */
24 static SkCachedData* FindAndRef(SkScalar sigma, const SkRRect& rrect, SkMask * mask);
25 static void Add(SkScalar sigma, const SkRRect& rrect,
26 const SkMask& mask, SkCachedData* data);
27
28 /**
29 * On success, return a ref to the SkCachedData that holds the pixels, and h ave mask
30 * already point to that memory.
31 *
32 * On failure, return NULL.
33 */
34 static SkCachedData* FindAndRef(SkScalar sigma, int32_t count,
35 const SkRect rects[], SkMask* mask);
36 static void Add(SkScalar sigma, int32_t count, const SkRect rects[],
37 const SkMask& mask, SkCachedData* data);
38 };
39
40 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698