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

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

Issue 950363002: Notify resource caches when pixelref genID goes stale (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update dox Created 5 years, 10 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 | « bench/ImageCacheBench.cpp ('k') | src/core/SkBitmapCache.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 SkBitmapCache_DEFINED 8 #ifndef SkBitmapCache_DEFINED
9 #define SkBitmapCache_DEFINED 9 #define SkBitmapCache_DEFINED
10 10
11 #include "SkScalar.h" 11 #include "SkScalar.h"
12 #include "SkBitmap.h" 12 #include "SkBitmap.h"
13 13
14 class SkResourceCache; 14 class SkResourceCache;
15 class SkMipMap; 15 class SkMipMap;
16 16
17 uint64_t SkMakeResourceCacheSharedIDForBitmap(uint32_t bitmapGenID);
18
19 void SkNotifyBitmapGenIDIsStale(uint32_t bitmapGenID);
20
17 class SkBitmapCache { 21 class SkBitmapCache {
18 public: 22 public:
19 /** 23 /**
20 * Use this allocator for bitmaps, so they can use ashmem when available. 24 * Use this allocator for bitmaps, so they can use ashmem when available.
21 * Returns NULL if the ResourceCache has not been initialized with a Discard ableFactory. 25 * Returns NULL if the ResourceCache has not been initialized with a Discard ableFactory.
22 */ 26 */
23 static SkBitmap::Allocator* GetAllocator(); 27 static SkBitmap::Allocator* GetAllocator();
24 28
25 /** 29 /**
26 * Search based on the src bitmap and inverse scales in X and Y. If found, returns true and 30 * Search based on the src bitmap and inverse scales in X and Y. If found, returns true and
(...skipping 23 matching lines...) Expand all
50 SkResourceCache* localCache = NULL); 54 SkResourceCache* localCache = NULL);
51 }; 55 };
52 56
53 class SkMipMapCache { 57 class SkMipMapCache {
54 public: 58 public:
55 static const SkMipMap* FindAndRef(const SkBitmap& src, SkResourceCache* loca lCache = NULL); 59 static const SkMipMap* FindAndRef(const SkBitmap& src, SkResourceCache* loca lCache = NULL);
56 static const SkMipMap* AddAndRef(const SkBitmap& src, SkResourceCache* local Cache = NULL); 60 static const SkMipMap* AddAndRef(const SkBitmap& src, SkResourceCache* local Cache = NULL);
57 }; 61 };
58 62
59 #endif 63 #endif
OLDNEW
« no previous file with comments | « bench/ImageCacheBench.cpp ('k') | src/core/SkBitmapCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698