OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 SkImage_DEFINED | 8 #ifndef SkImage_DEFINED |
9 #define SkImage_DEFINED | 9 #define SkImage_DEFINED |
10 | 10 |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
313 */ | 313 */ |
314 sk_sp<SkImage> makeSubset(const SkIRect& subset) const; | 314 sk_sp<SkImage> makeSubset(const SkIRect& subset) const; |
315 | 315 |
316 /** | 316 /** |
317 * Ensures that an image is backed by a texture (when GrContext is non-null ). If no | 317 * Ensures that an image is backed by a texture (when GrContext is non-null ). If no |
318 * transformation is required, the returned image may be the same as this i mage. If the this | 318 * transformation is required, the returned image may be the same as this i mage. If the this |
319 * image is from a different GrContext, this will fail. | 319 * image is from a different GrContext, this will fail. |
320 */ | 320 */ |
321 sk_sp<SkImage> makeTextureImage(GrContext*) const; | 321 sk_sp<SkImage> makeTextureImage(GrContext*) const; |
322 | 322 |
323 /** | |
324 * Apply a given image filter to this image, and return the filtered result . | |
325 * | |
326 * The subset represents the active portion of this image. The return value is similarly an | |
robertphillips
2016/05/19 21:14:44
Skimage -> SkImage ?
Stephen White
2016/05/19 21:27:43
Done.
| |
327 * Skimage, with an active subset (outSubset). This is usually used with te xture-backed | |
328 * images, where the texture may be approx-match and thus larger than the r equired size. | |
329 * | |
330 * clipBounds constrains the device-space extent of the image which may be produced to the | |
331 * given rect. | |
332 * | |
333 * offset is the amount to translate the resulting image relative to the sr c when it is drawn. | |
334 * This is an out-param. | |
335 * | |
336 * If the result image cannot be created, or the result would be transparen t black, null | |
337 * is returned, in which case the offset and outSubset parameters should be ignored by the | |
338 * caller. | |
339 */ | |
340 sk_sp<SkImage> makeWithFilter(const SkImageFilter* filter, const SkIRect& su bset, | |
341 const SkIRect& clipBounds, SkIRect* outSubset, | |
342 SkIPoint* offset) const; | |
343 | |
323 /** Drawing params for which a deferred texture image data should be optimiz ed. */ | 344 /** Drawing params for which a deferred texture image data should be optimiz ed. */ |
324 struct DeferredTextureImageUsageParams { | 345 struct DeferredTextureImageUsageParams { |
325 SkMatrix fMatrix; | 346 SkMatrix fMatrix; |
326 SkFilterQuality fQuality; | 347 SkFilterQuality fQuality; |
327 }; | 348 }; |
328 | 349 |
329 /** | 350 /** |
330 * This method allows clients to capture the data necessary to turn a SkImag e into a texture- | 351 * This method allows clients to capture the data necessary to turn a SkImag e into a texture- |
331 * backed image. If the original image is codec-backed this will decode into a format optimized | 352 * backed image. If the original image is codec-backed this will decode into a format optimized |
332 * for the context represented by the proxy. This method is thread safe with respect to the | 353 * for the context represented by the proxy. This method is thread safe with respect to the |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
423 | 444 |
424 private: | 445 private: |
425 const int fWidth; | 446 const int fWidth; |
426 const int fHeight; | 447 const int fHeight; |
427 const uint32_t fUniqueID; | 448 const uint32_t fUniqueID; |
428 | 449 |
429 typedef SkRefCnt INHERITED; | 450 typedef SkRefCnt INHERITED; |
430 }; | 451 }; |
431 | 452 |
432 #endif | 453 #endif |
OLD | NEW |