Chromium Code Reviews| 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 297 * to empty. | 297 * to empty. |
| 298 */ | 298 */ |
| 299 bool asLegacyBitmap(SkBitmap*, LegacyBitmapMode) const; | 299 bool asLegacyBitmap(SkBitmap*, LegacyBitmapMode) const; |
| 300 | 300 |
| 301 /** | 301 /** |
| 302 * Returns true if the image is backed by an image-generator or other src t hat creates | 302 * Returns true if the image is backed by an image-generator or other src t hat creates |
| 303 * (and caches) its pixels / texture on-demand. | 303 * (and caches) its pixels / texture on-demand. |
| 304 */ | 304 */ |
| 305 bool isLazyGenerated() const; | 305 bool isLazyGenerated() const; |
| 306 | 306 |
| 307 /** | |
| 308 * Apply the specified filter to this image, and return the result as a new image. | |
| 309 * | |
| 310 * if forceResultToOriginalSize is true, then the resulting image will be t he same size as the | |
| 311 * src, regardless of the normal output of the filter. | |
| 312 * | |
|
robertphillips
2015/10/12 16:43:32
need -> needed
reed1
2015/10/12 18:02:19
Done.
| |
| 313 * If offset is non-null, it is set to the relative offset need to draw the resulting image | |
| 314 * in the same logical place as the original. | |
| 315 * | |
| 316 * e.g. | |
| 317 * If the filter makes the result larger by a margin of 4 the output wo uld be: | |
|
robertphillips
2015/10/12 16:43:32
odd mix of ->/. and =/==
reed1
2015/10/12 17:08:45
Written from the caller's perspective, where resul
| |
| 318 * result->width() = this->width + 8 | |
| 319 * result->height() = this->height + 8 | |
| 320 * offset.x() == -4 | |
| 321 * offset.y() == -4 | |
| 322 * | |
| 323 * If the filter fails to create a resulting image, null is returned. | |
| 324 */ | |
| 325 SkImage* applyFilter(SkImageFilter* filter, SkIPoint* offset, | |
| 326 bool forceResultToOriginalSize) const; | |
| 327 | |
| 307 protected: | 328 protected: |
| 308 SkImage(int width, int height, uint32_t uniqueID); | 329 SkImage(int width, int height, uint32_t uniqueID); |
| 309 | 330 |
| 310 private: | 331 private: |
| 311 const int fWidth; | 332 const int fWidth; |
| 312 const int fHeight; | 333 const int fHeight; |
| 313 const uint32_t fUniqueID; | 334 const uint32_t fUniqueID; |
| 314 | 335 |
| 315 typedef SkRefCnt INHERITED; | 336 typedef SkRefCnt INHERITED; |
| 316 }; | 337 }; |
| 317 | 338 |
| 318 #endif | 339 #endif |
| OLD | NEW |