OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 SkBitmapController_DEFINED | 8 #ifndef SkBitmapController_DEFINED |
9 #define SkBitmapController_DEFINED | 9 #define SkBitmapController_DEFINED |
10 | 10 |
(...skipping 22 matching lines...) Expand all Loading... |
33 private: | 33 private: |
34 friend class SkBitmapController; | 34 friend class SkBitmapController; |
35 }; | 35 }; |
36 | 36 |
37 virtual ~SkBitmapController() {} | 37 virtual ~SkBitmapController() {} |
38 | 38 |
39 State* requestBitmap(const SkBitmap&, const SkMatrix& inverse, SkFilterQuali
ty, | 39 State* requestBitmap(const SkBitmap&, const SkMatrix& inverse, SkFilterQuali
ty, |
40 void* storage, size_t storageSize); | 40 void* storage, size_t storageSize); |
41 | 41 |
42 State* requestBitmap(const SkBitmap& bm, const SkMatrix& inverse, SkFilterQu
ality quality) { | 42 State* requestBitmap(const SkBitmap& bm, const SkMatrix& inverse, SkFilterQu
ality quality) { |
43 return this->requestBitmap(bm, inverse, quality, NULL, 0); | 43 return this->requestBitmap(bm, inverse, quality, nullptr, 0); |
44 } | 44 } |
45 | 45 |
46 protected: | 46 protected: |
47 virtual State* onRequestBitmap(const SkBitmap&, const SkMatrix& inverse, SkF
ilterQuality, | 47 virtual State* onRequestBitmap(const SkBitmap&, const SkMatrix& inverse, SkF
ilterQuality, |
48 void* storage, size_t storageSize) = 0; | 48 void* storage, size_t storageSize) = 0; |
49 }; | 49 }; |
50 | 50 |
51 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 51 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
52 | 52 |
53 class SkDefaultBitmapController : public SkBitmapController { | 53 class SkDefaultBitmapController : public SkBitmapController { |
54 public: | 54 public: |
55 SkDefaultBitmapController() {} | 55 SkDefaultBitmapController() {} |
56 | 56 |
57 protected: | 57 protected: |
58 State* onRequestBitmap(const SkBitmap&, const SkMatrix& inverse, SkFilterQua
lity, | 58 State* onRequestBitmap(const SkBitmap&, const SkMatrix& inverse, SkFilterQua
lity, |
59 void* storage, size_t storageSize) override; | 59 void* storage, size_t storageSize) override; |
60 }; | 60 }; |
61 | 61 |
62 #endif | 62 #endif |
OLD | NEW |