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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 * If the result image cannot be created, or the result would be transparen
t black, null | 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 | 337 * is returned, in which case the offset and outSubset parameters should be
ignored by the |
338 * caller. | 338 * caller. |
339 */ | 339 */ |
340 sk_sp<SkImage> makeWithFilter(const SkImageFilter* filter, const SkIRect& su
bset, | 340 sk_sp<SkImage> makeWithFilter(const SkImageFilter* filter, const SkIRect& su
bset, |
341 const SkIRect& clipBounds, SkIRect* outSubset, | 341 const SkIRect& clipBounds, SkIRect* outSubset, |
342 SkIPoint* offset) const; | 342 SkIPoint* offset) const; |
343 | 343 |
344 /** 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. */ |
345 struct DeferredTextureImageUsageParams { | 345 struct DeferredTextureImageUsageParams { |
| 346 DeferredTextureImageUsageParams() : fPreScaleMipLevel(0) {} |
| 347 DeferredTextureImageUsageParams(const SkMatrix matrix, const SkFilterQua
lity quality, |
| 348 int preScaleMipLevel) |
| 349 : fMatrix(matrix), fQuality(quality), fPreScaleMipLevel(preScaleMipL
evel) {} |
346 SkMatrix fMatrix; | 350 SkMatrix fMatrix; |
347 SkFilterQuality fQuality; | 351 SkFilterQuality fQuality; |
| 352 int fPreScaleMipLevel; |
348 }; | 353 }; |
349 | 354 |
350 /** | 355 /** |
351 * This method allows clients to capture the data necessary to turn a SkImag
e into a texture- | 356 * This method allows clients to capture the data necessary to turn a SkImag
e into a texture- |
352 * backed image. If the original image is codec-backed this will decode into
a format optimized | 357 * backed image. If the original image is codec-backed this will decode into
a format optimized |
353 * for the context represented by the proxy. This method is thread safe with
respect to the | 358 * for the context represented by the proxy. This method is thread safe with
respect to the |
354 * GrContext whence the proxy came. Clients allocate and manage the storage
of the deferred | 359 * GrContext whence the proxy came. Clients allocate and manage the storage
of the deferred |
355 * texture data and control its lifetime. No cleanup is required, thus it is
safe to simply free | 360 * texture data and control its lifetime. No cleanup is required, thus it is
safe to simply free |
356 * the memory out from under the data. | 361 * the memory out from under the data. |
357 * | 362 * |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 SkBudgeted); | 453 SkBudgeted); |
449 | 454 |
450 const int fWidth; | 455 const int fWidth; |
451 const int fHeight; | 456 const int fHeight; |
452 const uint32_t fUniqueID; | 457 const uint32_t fUniqueID; |
453 | 458 |
454 typedef SkRefCnt INHERITED; | 459 typedef SkRefCnt INHERITED; |
455 }; | 460 }; |
456 | 461 |
457 #endif | 462 #endif |
OLD | NEW |