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

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

Issue 844673002: Revert of Cache blur mask for rects which can not break into nine-patch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | 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
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkMaskCache_DEFINED 8 #ifndef SkMaskCache_DEFINED
9 #define SkMaskCache_DEFINED 9 #define SkMaskCache_DEFINED
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 /** 33 /**
34 * Add a mask and its pixel-data to the cache. 34 * Add a mask and its pixel-data to the cache.
35 */ 35 */
36 static void Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 36 static void Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality,
37 const SkRRect& rrect, const SkMask& mask, SkCachedData* data , 37 const SkRRect& rrect, const SkMask& mask, SkCachedData* data ,
38 SkResourceCache* localCache = NULL); 38 SkResourceCache* localCache = NULL);
39 static void Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality, 39 static void Add(SkScalar sigma, SkBlurStyle style, SkBlurQuality quality,
40 const SkRect rects[], int count, const SkMask& mask, SkCache dData* data, 40 const SkRect rects[], int count, const SkMask& mask, SkCache dData* data,
41 SkResourceCache* localCache = NULL); 41 SkResourceCache* localCache = NULL);
42
43 /**
44 * On success, set mask with cached value, allocate memory for mask->fImage,
45 * copy pixels from SkCachedData in the cache to mask->fImage, then return t rue.
46 *
47 * On failure, return false, no memory allocated for mask->fImage.
48 */
49 static bool FindAndCopy(SkScalar sigma, SkBlurStyle style, SkBlurQuality qua lity,
50 const SkRRect& rrect, SkMask* mask);
51 static bool FindAndCopy(SkScalar sigma, SkBlurStyle style, SkBlurQuality qua lity,
52 const SkRect rects[], int count, SkMask* mask);
53
54 /**
55 * Create a new SkCachedData, copy pixels from mask.fImage to it, then add i t into cache.
56 */
57 static void AddAndCopy(SkScalar sigma, SkBlurStyle style, SkBlurQuality qual ity,
58 const SkRRect& rrect, const SkMask& mask);
59 static void AddAndCopy(SkScalar sigma, SkBlurStyle style, SkBlurQuality qual ity,
60 const SkRect rects[], int count, const SkMask& mask);
61 }; 42 };
62 43
63 #endif 44 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkMaskCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698