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 GrTextureMaker_DEFINED | 8 #ifndef GrTextureMaker_DEFINED |
9 #define GrTextureMaker_DEFINED | 9 #define GrTextureMaker_DEFINED |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 */ | 101 */ |
102 virtual void makeCopyKey(const CopyParams&, GrUniqueKey* copyKey) = 0; | 102 virtual void makeCopyKey(const CopyParams&, GrUniqueKey* copyKey) = 0; |
103 | 103 |
104 /** | 104 /** |
105 * If a stretched version of the texture is generated, it may be cached (ass
uming that | 105 * If a stretched version of the texture is generated, it may be cached (ass
uming that |
106 * makeCopyKey() returns true). In that case, the maker is notified in case
it | 106 * makeCopyKey() returns true). In that case, the maker is notified in case
it |
107 * wants to note that for when the maker is destroyed. | 107 * wants to note that for when the maker is destroyed. |
108 */ | 108 */ |
109 virtual void didCacheCopy(const GrUniqueKey& copyKey) = 0; | 109 virtual void didCacheCopy(const GrUniqueKey& copyKey) = 0; |
110 | 110 |
| 111 virtual SkColorSpace* getColorSpace() = 0; |
| 112 |
111 private: | 113 private: |
112 const int fWidth; | 114 const int fWidth; |
113 const int fHeight; | 115 const int fHeight; |
114 const bool fIsAlphaOnly; | 116 const bool fIsAlphaOnly; |
115 | 117 |
116 typedef SkNoncopyable INHERITED; | 118 typedef SkNoncopyable INHERITED; |
117 }; | 119 }; |
118 | 120 |
119 /** | 121 /** |
120 * Base class for sources that start out as textures. Optionally allows for a co
ntent area subrect. | 122 * Base class for sources that start out as textures. Optionally allows for a co
ntent area subrect. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 | 208 |
207 GrContext* context() const { return fContext; } | 209 GrContext* context() const { return fContext; } |
208 | 210 |
209 private: | 211 private: |
210 GrContext* fContext; | 212 GrContext* fContext; |
211 | 213 |
212 typedef GrTextureProducer INHERITED; | 214 typedef GrTextureProducer INHERITED; |
213 }; | 215 }; |
214 | 216 |
215 #endif | 217 #endif |
OLD | NEW |