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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 GrTexture* originalTexture() const { return fOriginal; } | 147 GrTexture* originalTexture() const { return fOriginal; } |
148 | 148 |
149 /** Returns the content area or null for the whole original texture */ | 149 /** Returns the content area or null for the whole original texture */ |
150 const SkIRect* contentAreaOrNull() { return fContentArea.getMaybeNull(); } | 150 const SkIRect* contentAreaOrNull() { return fContentArea.getMaybeNull(); } |
151 | 151 |
152 private: | 152 private: |
153 SkTLazy<SkIRect> fContentArea; | 153 SkTLazy<SkIRect> fContentArea; |
154 GrTexture* fOriginal; | 154 GrTexture* fOriginal; |
155 | 155 |
| 156 GrTexture* refCopy(const CopyParams ©Params); |
| 157 |
156 typedef GrTextureProducer INHERITED; | 158 typedef GrTextureProducer INHERITED; |
157 }; | 159 }; |
158 | 160 |
159 /** | 161 /** |
160 * Base class for sources that start out as something other than a texture (enco
ded image, | 162 * Base class for sources that start out as something other than a texture (enco
ded image, |
161 * picture, ...). | 163 * picture, ...). |
162 */ | 164 */ |
163 class GrTextureMaker : public GrTextureProducer { | 165 class GrTextureMaker : public GrTextureProducer { |
164 public: | 166 public: |
165 /** Returns a texture that is safe for use with the params. If the size of t
he returned texture | 167 /** Returns a texture that is safe for use with the params. If the size of t
he returned texture |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 201 |
200 GrContext* context() const { return fContext; } | 202 GrContext* context() const { return fContext; } |
201 | 203 |
202 private: | 204 private: |
203 GrContext* fContext; | 205 GrContext* fContext; |
204 | 206 |
205 typedef GrTextureProducer INHERITED; | 207 typedef GrTextureProducer INHERITED; |
206 }; | 208 }; |
207 | 209 |
208 #endif | 210 #endif |
OLD | NEW |