| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |