| 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 sk_sp<SkImage> makeSubset(const SkIRect& subset) const; | 323 sk_sp<SkImage> makeSubset(const SkIRect& subset) const; |
| 324 | 324 |
| 325 /** | 325 /** |
| 326 * Ensures that an image is backed by a texture (when GrContext is non-null
). If no | 326 * Ensures that an image is backed by a texture (when GrContext is non-null
). If no |
| 327 * transformation is required, the returned image may be the same as this i
mage. If the this | 327 * transformation is required, the returned image may be the same as this i
mage. If the this |
| 328 * image is from a different GrContext, this will fail. | 328 * image is from a different GrContext, this will fail. |
| 329 */ | 329 */ |
| 330 sk_sp<SkImage> makeTextureImage(GrContext*) const; | 330 sk_sp<SkImage> makeTextureImage(GrContext*) const; |
| 331 | 331 |
| 332 /** | 332 /** |
| 333 * If the image is texture-backed this will make a raster copy of it (or nul
lptr if reading back |
| 334 * the pixels fails). Otherwise, it returns the original image. |
| 335 */ |
| 336 sk_sp<SkImage> makeNonTextureImage() const; |
| 337 /** |
| 333 * Apply a given image filter to this image, and return the filtered result
. | 338 * Apply a given image filter to this image, and return the filtered result
. |
| 334 * | 339 * |
| 335 * The subset represents the active portion of this image. The return value
is similarly an | 340 * The subset represents the active portion of this image. The return value
is similarly an |
| 336 * SkImage, with an active subset (outSubset). This is usually used with te
xture-backed | 341 * SkImage, with an active subset (outSubset). This is usually used with te
xture-backed |
| 337 * images, where the texture may be approx-match and thus larger than the r
equired size. | 342 * images, where the texture may be approx-match and thus larger than the r
equired size. |
| 338 * | 343 * |
| 339 * clipBounds constrains the device-space extent of the image which may be
produced to the | 344 * clipBounds constrains the device-space extent of the image which may be
produced to the |
| 340 * given rect. | 345 * given rect. |
| 341 * | 346 * |
| 342 * offset is the amount to translate the resulting image relative to the sr
c when it is drawn. | 347 * offset is the amount to translate the resulting image relative to the sr
c when it is drawn. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 SkBudgeted); | 467 SkBudgeted); |
| 463 | 468 |
| 464 const int fWidth; | 469 const int fWidth; |
| 465 const int fHeight; | 470 const int fHeight; |
| 466 const uint32_t fUniqueID; | 471 const uint32_t fUniqueID; |
| 467 | 472 |
| 468 typedef SkRefCnt INHERITED; | 473 typedef SkRefCnt INHERITED; |
| 469 }; | 474 }; |
| 470 | 475 |
| 471 #endif | 476 #endif |
| OLD | NEW |