diff options
author | halcanary <halcanary@google.com> | 2014-08-12 08:04:58 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-12 08:04:58 -0700 |
commit | 186f7b04956a1742f185a4ca69b44b52bc50e7fc (patch) | |
tree | ebbde0eb4c32e2aa13e60ef3afdda2c73e10f457 /include | |
parent | 5e27e0eb1d1d4c7674e221d3ba3314500ea0b97a (diff) |
SkImage::NewFromGenerator(SkImageGenerator*), and a unit test.
R=reed@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/465823003
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkImage.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/core/SkImage.h b/include/core/SkImage.h index 581129e720..1316e2b595 100644 --- a/include/core/SkImage.h +++ b/include/core/SkImage.h @@ -16,6 +16,7 @@ class SkData; class SkCanvas; +class SkImageGenerator; class SkPaint; class GrContext; class GrTexture; @@ -47,6 +48,13 @@ public: */ static SkImage* NewTexture(const SkBitmap&); + /** + * Construct a new SkImage based on the given ImageGenerator. + * This function will always take ownership of the passed + * ImageGenerator. Returns NULL on error. + */ + static SkImage* NewFromGenerator(SkImageGenerator*); + int width() const { return fWidth; } int height() const { return fHeight; } uint32_t uniqueID() const { return fUniqueID; } |