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

Side by Side Diff: include/core/SkImageFilter.h

Issue 1901883002: Make SkImageFilter::Cache purging methods pure virtual (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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/SkImageFilter.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 2011 Google Inc. 2 * Copyright 2011 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 SkImageFilter_DEFINED 8 #ifndef SkImageFilter_DEFINED
9 #define SkImageFilter_DEFINED 9 #define SkImageFilter_DEFINED
10 10
(...skipping 29 matching lines...) Expand all
40 class Cache : public SkRefCnt { 40 class Cache : public SkRefCnt {
41 public: 41 public:
42 struct Key; 42 struct Key;
43 virtual ~Cache() {} 43 virtual ~Cache() {}
44 static Cache* Create(size_t maxBytes); 44 static Cache* Create(size_t maxBytes);
45 static Cache* Get(); 45 static Cache* Get();
46 virtual bool get(const Key& key, SkBitmap* result, SkIPoint* offset) con st = 0; 46 virtual bool get(const Key& key, SkBitmap* result, SkIPoint* offset) con st = 0;
47 virtual SkSpecialImage* get(const Key& key, SkIPoint* offset) const = 0; 47 virtual SkSpecialImage* get(const Key& key, SkIPoint* offset) const = 0;
48 virtual void set(const Key& key, const SkBitmap& result, const SkIPoint& offset) = 0; 48 virtual void set(const Key& key, const SkBitmap& result, const SkIPoint& offset) = 0;
49 virtual void set(const Key& key, SkSpecialImage* image, const SkIPoint& offset) = 0; 49 virtual void set(const Key& key, SkSpecialImage* image, const SkIPoint& offset) = 0;
50 virtual void purge() {} 50 virtual void purge() = 0;
51 virtual void purgeByKeys(const Key[], int) {} 51 virtual void purgeByKeys(const Key[], int) = 0;
52 SkDEBUGCODE(virtual int count() const = 0;)
52 }; 53 };
53 54
54 class Context { 55 class Context {
55 public: 56 public:
56 Context(const SkMatrix& ctm, const SkIRect& clipBounds, Cache* cache) 57 Context(const SkMatrix& ctm, const SkIRect& clipBounds, Cache* cache)
57 : fCTM(ctm) 58 : fCTM(ctm)
58 , fClipBounds(clipBounds) 59 , fClipBounds(clipBounds)
59 , fCache(cache) 60 , fCache(cache)
60 {} 61 {}
61 62
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 */ 430 */
430 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \ 431 #define SK_IMAGEFILTER_UNFLATTEN_COMMON(localVar, expectedCount) \
431 Common localVar; \ 432 Common localVar; \
432 do { \ 433 do { \
433 if (!localVar.unflatten(buffer, expectedCount)) { \ 434 if (!localVar.unflatten(buffer, expectedCount)) { \
434 return NULL; \ 435 return NULL; \
435 } \ 436 } \
436 } while (0) 437 } while (0)
437 438
438 #endif 439 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698