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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 return this->requestBitmap(bp, inv, quality, nullptr, 0); | 46 return this->requestBitmap(bp, inv, quality, nullptr, 0); |
47 } | 47 } |
48 | 48 |
49 protected: | 49 protected: |
50 virtual State* onRequestBitmap(const SkBitmapProvider&, const SkMatrix& inv,
SkFilterQuality, | 50 virtual State* onRequestBitmap(const SkBitmapProvider&, const SkMatrix& inv,
SkFilterQuality, |
51 void* storage, size_t storageSize) = 0; | 51 void* storage, size_t storageSize) = 0; |
52 }; | 52 }; |
53 | 53 |
54 ////////////////////////////////////////////////////////////////////////////////
/////////////////// | 54 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
55 | 55 |
| 56 #include "SkMipMap.h" |
| 57 |
56 class SkDefaultBitmapController : public SkBitmapController { | 58 class SkDefaultBitmapController : public SkBitmapController { |
57 public: | 59 public: |
58 SkDefaultBitmapController() {} | 60 SkDefaultBitmapController(SkSourceGammaTreatment treatment) : fSrcGammaTreat
ment(treatment) {} |
59 | 61 |
60 protected: | 62 protected: |
61 State* onRequestBitmap(const SkBitmapProvider&, const SkMatrix& inverse, SkF
ilterQuality, | 63 State* onRequestBitmap(const SkBitmapProvider&, const SkMatrix& inverse, SkF
ilterQuality, |
62 void* storage, size_t storageSize) override; | 64 void* storage, size_t storageSize) override; |
| 65 |
| 66 private: |
| 67 const SkSourceGammaTreatment fSrcGammaTreatment; |
63 }; | 68 }; |
64 | 69 |
65 #endif | 70 #endif |
OLD | NEW |